Skip to content

Commit

Permalink
Update jrpc2 and release new tools.
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Mar 19, 2023
1 parent db7cf41 commit 3cdc3db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions tools/examples/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

"github.com/creachadair/jrpc2"
"github.com/creachadair/jrpc2/channel"
"github.com/creachadair/jrpc2/code"
"github.com/creachadair/jrpc2/handler"
"github.com/creachadair/jrpc2/server"
)
Expand Down Expand Up @@ -47,7 +46,7 @@ func Mul(ctx context.Context, x, y int) int { return x * y }
// Div converts its arguments to floating point and returns their ratio.
func Div(ctx context.Context, arg binop) (float64, error) {
if arg.Y == 0 {
return 0, jrpc2.Errorf(code.InvalidParams, "zero divisor")
return 0, jrpc2.Errorf(jrpc2.InvalidParams, "zero divisor")
}
return float64(arg.X) / float64(arg.Y), nil
}
Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/creachadair/jrpc2/tools
go 1.19

require (
github.com/creachadair/jrpc2 v0.45.0
github.com/creachadair/jrpc2 v0.46.0
github.com/creachadair/wschannel v0.0.0-20230226191131-7aa9a71379df
)

Expand Down
4 changes: 2 additions & 2 deletions tools/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/creachadair/jrpc2 v0.45.0 h1:61Cdy1IbyB3So5+znIQ4eki4P1/j/FiNIy0SS9j3kJY=
github.com/creachadair/jrpc2 v0.45.0/go.mod h1:O7R/rmcUivGXUkfmbuWevcLv6f1xbKVSoMvmhW4/fr8=
github.com/creachadair/jrpc2 v0.46.0 h1:ahMNQN8Q6oJDC6Zn/TPK1YRAP5alFQ5hk2h5tzBVifE=
github.com/creachadair/jrpc2 v0.46.0/go.mod h1:O7R/rmcUivGXUkfmbuWevcLv6f1xbKVSoMvmhW4/fr8=
github.com/creachadair/mds v0.0.0-20230313153906-9788b6f60568 h1:LzMDPh2FLXEHnQNTjGJT+vInPSDVOUTuzqE4GskHTNg=
github.com/creachadair/mds v0.0.0-20230313153906-9788b6f60568/go.mod h1:caBACU+n1Q/rZ252FTzfnG0/H+ZUi+UnIQtEOraMv/g=
github.com/creachadair/wschannel v0.0.0-20230226191131-7aa9a71379df h1:hONVtXPlLCi5PO8zd0a0F2H7nXY0TEldNxTuU8bS1Lk=
Expand Down

0 comments on commit 3cdc3db

Please sign in to comment.