Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
powerman committed Feb 11, 2016
1 parent dd1bd07 commit 103c760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsonrpc2/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (*ExampleSvc) Err2(struct{}, *struct{}) error {

// Method returns error with code 42 and extra error data.
func (*ExampleSvc) Err3(struct{}, *struct{}) error {
return &jsonrpc2.Error{42, "some issue", map[string]int{"one": 1, "two": 2}}
return &jsonrpc2.Error{42, "some issue", []string{"one", "two"}}
}

func Example() {
Expand Down Expand Up @@ -139,5 +139,5 @@ func Example() {
// SumAll(3,5,-2)=6
// MapLen({a:10,b:20,c:30})=3
// Err1(): code=-32000 msg="some issue" data=<nil>
// Err3(): code=42 msg="some issue" data=map[one:1 two:2]
// Err3(): code=42 msg="some issue" data=[one two]
}

0 comments on commit 103c760

Please sign in to comment.