Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ktr0731 committed Dec 10, 2020
1 parent 6628901 commit bda5af6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ import (
"encoding/json"
"fmt"
"log"

"github.com/ktr0731/apigen/client"
)

func main() {
client := NewDummyClient()
client := NewDummyClient(client.WithInterceptors(client.ConvertStatusCodeToErrorInterceptor()))

res, err := client.GetPost(context.Background(), &GetPostRequest{ID: "10"})
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion _example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import (
"encoding/json"
"fmt"
"log"

"github.com/ktr0731/apigen/client"
)

func main() {
client := NewDummyClient()
client := NewDummyClient(client.WithInterceptors(client.ConvertStatusCodeToErrorInterceptor()))

res, err := client.GetPost(context.Background(), &GetPostRequest{ID: "10"})
if err != nil {
Expand Down

0 comments on commit bda5af6

Please sign in to comment.