Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
Merge pull request #75 from ericchiang/readme-fix
Browse files Browse the repository at this point in the history
fix API errors README example
  • Loading branch information
ericchiang committed Jan 20, 2018
2 parents 72a6e54 + b6e4a43 commit 5912993
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func createConfigMap(client *k8s.Client, name string, values map[string]string)
Data: values,
}

_, err := client.CoreV1().CreateConfigMap(context.TODO(), cm)
err := client.Create(context.TODO(), cm)

// If an HTTP error was returned by the API server, it will be of type
// *k8s.APIError. This can be used to inspect the status code.
Expand Down
3 changes: 0 additions & 3 deletions examples/api-errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ func createConfigMap(client *k8s.Client, name string, values map[string]string)
}

err := client.Create(context.Background(), cm)
if err == nil {
return err
}

// If an HTTP error was returned by the API server, it will be of type
// *k8s.APIError. This can be used to inspect the status code.
Expand Down

0 comments on commit 5912993

Please sign in to comment.