diff --git a/example/main.go b/example/main.go index a2e9054..d7ba22a 100644 --- a/example/main.go +++ b/example/main.go @@ -19,7 +19,7 @@ func main() { signal.Notify(interrupt, os.Interrupt, os.Kill) // Init the client via server credentials - client := nym.NewClient("ws://192.168.88.3:1977") + client := nym.NewClient("ws://192.168.88.4:1977") // Dial a connection to the server if err := client.Dial(); err != nil { @@ -59,14 +59,14 @@ func main() { } // Send a message - addr := "24b55Qzwct8PfVENpvtfugbds2EUjMVfE4MGb2TuHfsk.8PbP7rCGU7VZHofGHFiHMWzshYGgZjjsVGJhzMmrZnWt@EBT8jTD8o4tKng2NXrrcrzVhJiBnKpT1bJy5CMeArt2w" + addr := "2w2mvQzGHuzXdz1pQSvTWXiqZe26Z2BKNkFTQ5g7MuLi.DfkhfLipgtuRLAWWHx74iGkJWCpM6U5RFwaJ3FUaMicu@HWdr8jgcr32cVGbjisjmwnVF4xrUBRGvbw86F9e3rFzS" r := nym.NewSend("Mix it up!", addr) if err := client.SendRequestAsText(r); err != nil { fmt.Fprintln(os.Stderr, err) } // Send an anonymous message - addr = "24b55Qzwct8PfVENpvtfugbds2EUjMVfE4MGb2TuHfsk.8PbP7rCGU7VZHofGHFiHMWzshYGgZjjsVGJhzMmrZnWt@EBT8jTD8o4tKng2NXrrcrzVhJiBnKpT1bJy5CMeArt2w" + addr = "2w2mvQzGHuzXdz1pQSvTWXiqZe26Z2BKNkFTQ5g7MuLi.DfkhfLipgtuRLAWWHx74iGkJWCpM6U5RFwaJ3FUaMicu@HWdr8jgcr32cVGbjisjmwnVF4xrUBRGvbw86F9e3rFzS" replySurbs := 1 r = nym.NewSendAnonymous("Enjoy your anonymous!", addr, replySurbs) if err := client.SendRequestAsText(r); err != nil { @@ -74,7 +74,7 @@ func main() { } // Reply to an anonymous message - senderTag := "Frwzy6mWLSkqrdQwFLhJdL" + senderTag := "7vv2LmF9M6EwQRrmCiCJhr" r = nym.NewReply("Pong.", senderTag) if err := client.SendRequestAsText(r); err != nil { fmt.Fprintln(os.Stderr, err) diff --git a/go.mod b/go.mod index 6921800..8c8fc12 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ module github.com/craftdome/go-nym -go 1.20 +go 1.21.4 require ( - github.com/gorilla/websocket v1.5.0 + github.com/gorilla/websocket v1.5.1 github.com/pkg/errors v0.9.1 ) + +require golang.org/x/net v0.18.0 // indirect diff --git a/go.sum b/go.sum index 14ec0d6..e6f7537 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,10 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=