Skip to content

Commit 8a01943

Browse files
author
maksim.konovalov
committed
Check err on GetTyped in example
1 parent ed9f690 commit 8a01943

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

box/example_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,9 @@ func Example() {
3535

3636
resp := &box.InfoResponse{}
3737
err = fut.GetTyped(resp)
38+
if err != nil {
39+
log.Fatalf("Failed get box info: %s", err)
40+
}
41+
3842
fmt.Printf("Current box info: %+v\n", resp.Info)
3943
}

0 commit comments

Comments
 (0)