diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2022-01-31 20:17:31 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2022-01-31 20:25:19 +0300 |
commit | 4cf58de9bb7b109dddbc80adefe52cdf61328d0d (patch) | |
tree | dbc4c46eb64672e077305aebbe694acd1acf4828 /examples | |
parent | 35fee8155bb6835d372c364ef721077b0dcb9d38 (diff) |
Small refactoring
Diffstat (limited to 'examples')
-rw-r--r-- | examples/http/main.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/http/main.go b/examples/http/main.go index 730fc03..5783c05 100644 --- a/examples/http/main.go +++ b/examples/http/main.go @@ -5,13 +5,15 @@ import ( "errors" "net/http" - "github.com/neonxp/jsonrpc2" + httpRPC "github.com/neonxp/jsonrpc2/http" + "github.com/neonxp/jsonrpc2/rpc" ) func main() { - s := jsonrpc2.New() - s.Register("multiply", jsonrpc2.Wrap(Multiply)) - s.Register("divide", jsonrpc2.Wrap(Divide)) + s := httpRPC.New() + + s.Register("multiply", rpc.Wrap(Multiply)) + s.Register("divide", rpc.Wrap(Divide)) http.ListenAndServe(":8000", s) } |