From 32e0acb1478fc084cfc86da2e3e92e6c24537455 Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Tue, 2 Apr 2024 14:06:51 -0400 Subject: [PATCH] Update go.mod version to 1.19 Relates to pion/webrtc#2292 --- datachannel_go_test.go | 5 ++--- examples/internal/signal/http.go | 4 ++-- examples/internal/signal/signal.go | 3 +-- examples/pion-to-pion/answer/main.go | 4 ++-- examples/pion-to-pion/offer/main.go | 4 ++-- go.mod | 18 +++++++++++++++--- go.sum | 4 ---- 7 files changed, 24 insertions(+), 18 deletions(-) diff --git a/datachannel_go_test.go b/datachannel_go_test.go index baea1a9e7f..a8fd499dcc 100644 --- a/datachannel_go_test.go +++ b/datachannel_go_test.go @@ -11,7 +11,6 @@ import ( "crypto/rand" "encoding/binary" "io" - "io/ioutil" "math/big" "reflect" "regexp" @@ -419,7 +418,7 @@ func TestEOF(t *testing.T) { defer func() { assert.NoError(t, dc.Close(), "should succeed") }() log.Debug("Waiting for ping...") - msg, err2 := ioutil.ReadAll(dc) + msg, err2 := io.ReadAll(dc) log.Debugf("Received ping! \"%s\"", string(msg)) if err2 != nil { t.Error(err2) @@ -466,7 +465,7 @@ func TestEOF(t *testing.T) { assert.NoError(t, dc.Close(), "should succeed") log.Debug("Wating for EOF") - ret, err2 := ioutil.ReadAll(dc) + ret, err2 := io.ReadAll(dc) assert.Nil(t, err2, "should succeed") assert.Equal(t, 0, len(ret), "should be empty") }() diff --git a/examples/internal/signal/http.go b/examples/internal/signal/http.go index 4f81afe146..d705e6428f 100644 --- a/examples/internal/signal/http.go +++ b/examples/internal/signal/http.go @@ -5,7 +5,7 @@ package signal import ( "fmt" - "io/ioutil" + "io" "net/http" "strconv" ) @@ -14,7 +14,7 @@ import ( func HTTPSDPServer(port int) chan string { sdpChan := make(chan string) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - body, _ := ioutil.ReadAll(r.Body) + body, _ := io.ReadAll(r.Body) fmt.Fprintf(w, "done") sdpChan <- string(body) }) diff --git a/examples/internal/signal/signal.go b/examples/internal/signal/signal.go index 3c6bce9449..14547a33c0 100644 --- a/examples/internal/signal/signal.go +++ b/examples/internal/signal/signal.go @@ -13,7 +13,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "os" "strings" ) @@ -106,7 +105,7 @@ func unzip(in []byte) []byte { if err != nil { panic(err) } - res, err := ioutil.ReadAll(r) + res, err := io.ReadAll(r) if err != nil { panic(err) } diff --git a/examples/pion-to-pion/answer/main.go b/examples/pion-to-pion/answer/main.go index 627e8121a0..97a53f5826 100644 --- a/examples/pion-to-pion/answer/main.go +++ b/examples/pion-to-pion/answer/main.go @@ -9,7 +9,7 @@ import ( "encoding/json" "flag" "fmt" - "io/ioutil" + "io" "net/http" "os" "sync" @@ -81,7 +81,7 @@ func main() { // nolint:gocognit // This allows us to add ICE candidates faster, we don't have to wait for STUN or TURN // candidates which may be slower http.HandleFunc("/candidate", func(w http.ResponseWriter, r *http.Request) { //nolint: revive - candidate, candidateErr := ioutil.ReadAll(r.Body) + candidate, candidateErr := io.ReadAll(r.Body) if candidateErr != nil { panic(candidateErr) } diff --git a/examples/pion-to-pion/offer/main.go b/examples/pion-to-pion/offer/main.go index 2243fb7c08..236212a74a 100644 --- a/examples/pion-to-pion/offer/main.go +++ b/examples/pion-to-pion/offer/main.go @@ -9,7 +9,7 @@ import ( "encoding/json" "flag" "fmt" - "io/ioutil" + "io" "net/http" "os" "sync" @@ -81,7 +81,7 @@ func main() { //nolint:gocognit // This allows us to add ICE candidates faster, we don't have to wait for STUN or TURN // candidates which may be slower http.HandleFunc("/candidate", func(w http.ResponseWriter, r *http.Request) { //nolint: revive - candidate, candidateErr := ioutil.ReadAll(r.Body) + candidate, candidateErr := io.ReadAll(r.Body) if candidateErr != nil { panic(candidateErr) } diff --git a/go.mod b/go.mod index 8bcb7e0fe1..61eb05e6ca 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,8 @@ module github.com/pion/webrtc/v4 -go 1.13 +go 1.19 require ( - github.com/onsi/ginkgo v1.16.5 // indirect - github.com/onsi/gomega v1.17.0 // indirect github.com/pion/datachannel v1.5.6 github.com/pion/dtls/v2 v2.2.10 github.com/pion/ice/v3 v3.0.3 @@ -22,3 +20,17 @@ require ( github.com/stretchr/testify v1.9.0 golang.org/x/net v0.22.0 ) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/onsi/ginkgo v1.16.5 // indirect + github.com/onsi/gomega v1.17.0 // indirect + github.com/pion/mdns v0.0.12 // indirect + github.com/pion/transport/v2 v2.2.4 // indirect + github.com/pion/turn/v3 v3.0.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/sys v0.18.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum index 25968057e3..80f532891e 100644 --- a/go.sum +++ b/go.sum @@ -13,12 +13,10 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -177,7 +175,6 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -186,7 +183,6 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=