We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0444763 commit a085b48Copy full SHA for a085b48
box/example_test.go
@@ -31,13 +31,30 @@ func Example() {
31
log.Fatalf("Failed to connect: %s", err)
32
}
33
34
+ // You can use Info Request type.
35
+
36
fut := client.Do(box.NewInfoRequest())
37
38
resp := &box.InfoResponse{}
39
40
err = fut.GetTyped(resp)
41
if err != nil {
42
log.Fatalf("Failed get box info: %s", err)
43
44
45
+ // Or use simple Box implementation.
46
47
+ b := box.New(client)
48
49
+ info, err := b.Info()
50
+ if err != nil {
51
+ log.Fatalf("Failed get box info: %s", err)
52
+ }
53
54
+ if info.UUID != resp.Info.UUID {
55
+ log.Fatalf("Box info uuids are not equal")
56
57
58
+ fmt.Printf("Box info uuids are equal")
59
fmt.Printf("Current box info: %+v\n", resp.Info)
60
0 commit comments