Skip to content

Commit

Permalink
update go version to 1.21.4 and gorilla/websocket to v1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
craftdome committed Nov 17, 2023
1 parent 3f72aa7 commit b8b4756
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 4 additions & 4 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -59,22 +59,22 @@ 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 {
fmt.Fprintln(os.Stderr, err)
}

// 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)
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=

0 comments on commit b8b4756

Please sign in to comment.