Skip to content

Commit

Permalink
delete client from example
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamashou committed Apr 17, 2024
1 parent 6b7291c commit fd70bdd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions example/autobind/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"net/http"
"os"

"github.com/Yamashou/gqlgenc/client"
"github.com/Yamashou/gqlgenc/clientv2"
"github.com/Yamashou/gqlgenc/example/github/gen"
)
Expand All @@ -26,7 +25,7 @@ func main() {
}
getUser, err := githubClient.GetUser(ctx, 10, 10)
if err != nil {
if handledError, ok := err.(*client.ErrorResponse); ok {
if handledError, ok := err.(*clientv2.ErrorResponse); ok {
fmt.Fprintf(os.Stderr, "handled error: %s\n", handledError.Error())
} else {
fmt.Fprintf(os.Stderr, "unhandled error: %s\n", err.Error())
Expand All @@ -43,7 +42,7 @@ func main() {

res, err := githubClient.GetNode(ctx, repository.ID)
if err != nil {
if handledError, ok := err.(*client.ErrorResponse); ok {
if handledError, ok := err.(*clientv2.ErrorResponse); ok {
fmt.Fprintf(os.Stderr, "handled error: %s\n", handledError.Error())
} else {
fmt.Fprintf(os.Stderr, "unhandled error: %s\n", err.Error())
Expand Down

0 comments on commit fd70bdd

Please sign in to comment.