diff --git a/README.md b/README.md index 4a778ee..b12b834 100644 --- a/README.md +++ b/README.md @@ -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 { diff --git a/_example/main.go b/_example/main.go index 2ca7f99..342ee7b 100644 --- a/_example/main.go +++ b/_example/main.go @@ -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 {