Skip to content

Commit c289d1a

Browse files
author
Arthur Amstutz
committed
chore: Check error in README first example
1 parent 945a2da commit c289d1a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ type PartialMe struct {
2727
func main() {
2828
var me PartialMe
2929

30-
client, _ := ovh.NewClient(
30+
client, err := ovh.NewClient(
3131
"ovh-eu",
3232
YOUR_APPLICATION_KEY,
3333
YOUR_APPLICATION_SECRET,
3434
YOUR_CONSUMER_KEY,
3535
)
36+
if err != nil {
37+
fmt.Printf("Error: %q\n", err)
38+
return
39+
}
40+
3641
client.Get("/me", &me)
3742
fmt.Printf("Welcome %s!\n", me.Firstname)
3843
}

0 commit comments

Comments
 (0)