[chore] bump go-byteutil v1.2.0 -> v1.3.0 (#3356)

* bump go-byteutil v1.2.0 -> v1.3.0 which has safer (as in long-term API consistency) byte <-> string conversions

* fix test relying on byteutil exported type no longer existing
This commit is contained in:
kim 2024-09-26 19:50:08 +00:00 committed by GitHub
commit 58af95a1d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 13 additions and 81 deletions

View file

@ -18,6 +18,7 @@
package delivery_test
import (
"bytes"
"fmt"
"io"
"math/rand"
@ -27,7 +28,6 @@ import (
"strings"
"testing"
"codeberg.org/gruf/go-byteutil"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/httpclient"
"github.com/superseriousbusiness/gotosocial/internal/queue"
@ -176,9 +176,9 @@ func requiresBody(method string) bool {
func (t *testrequest) Generate(addr string) *http.Request {
var body io.ReadCloser
if t.body != nil {
var b byteutil.ReadNopCloser
var b bytes.Reader
b.Reset(t.body)
body = &b
body = io.NopCloser(&b)
}
req, err := http.NewRequest(t.method, addr+t.uri, body)
if err != nil {