You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stone https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#struct[structs] are represented as Go https://gobyexample.com/structs[structs] in a relatively straight-forward manner.
35
+
Stone [structs](https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#struct) are represented as Go [structs](https://gobyexample.com/structs) in a relatively straight-forward manner. Each struct member is exported and also gets assigned the correct json tag. The latter is used for serializing requests and deserializing responses. Non-primitive types are represented as pointers to the corresponding type.
23
36
24
37
```
25
-
struct Account <1>
38
+
struct Account
26
39
"The amount of detail revealed about an account depends on the user
27
-
being queried and the user making the query." <2>
40
+
being queried and the user making the query."
28
41
29
-
account_id AccountId <3>
30
-
"The user's unique Dropbox ID." <4>
31
-
name Name <5>
42
+
account_id AccountId
43
+
"The user's unique Dropbox ID."
44
+
name Name
32
45
"Details of a user's name."
33
46
```
34
47
35
48
```go
36
49
// The amount of detail revealed about an account depends on the user being
37
-
// queried and the user making the query. <2>
38
-
typeAccountstruct {// <1>
39
-
// The user's unique Dropbox ID. <4>
40
-
AccountIdstring`json:"account_id"`// <3>
41
-
// Details of a user's name.
42
-
Name *Name `json:"name"`// <5>
50
+
// queried and the user making the query.
51
+
typeAccountstruct {
52
+
// The user's unique Dropbox ID.
53
+
AccountIdstring`json:"account_id"`
54
+
// Details of a user's name.
55
+
Name *Name `json:"name"`
43
56
}
44
57
```
45
-
<1> A struct is defined as a Go struct
46
-
<2> The documentation shows up before the struct definition
47
-
<3> Each struct member is exported and also gets assigned the correct json tag. The latter is used for serializing requests and deserializing responses.
48
-
<4> Member documentation appears above the member definition
49
-
<5> Non-primitive types are represented as pointers to the corresponding type
0 commit comments