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
db := {{ sdk.gitRepoName|url_encode }}.NewDatabase(client)
65
+
data := map[string]string{
66
+
"hello": "world",
67
+
}
68
+
var EmptyArray = []interface{}{}
69
+
doc, err := db.CreateDocument(
70
+
os.Getenv("COLLECTION_ID"),
71
+
data,
72
+
EmptyArray,
73
+
EmptyArray,
74
+
"",
75
+
"",
76
+
"",
77
+
)
78
+
if err != nil {
79
+
log.Printf("Error creating document: %v", err)
80
+
}
81
+
log.Printf("Created document: %v", doc)
82
+
}
83
+
```
84
+
85
+
* After that, run the following
86
+
87
+
> % go run main.go
88
+
> 2021/10/16 03:41:17 Created document: map[$collection:616a095b20180 $id:616a2dbd4df16 $permissions:map[read:[] write:[]] hello:world]
89
+
31
90
{% ifsdk.gettingStarted %}
32
91
33
92
{{ sdk.gettingStarted|raw }}
34
93
{% endif %}
35
94
36
95
## Contribution
37
96
38
-
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
97
+
This library is auto-generated by {{ spec.title }} custom [SDK Generator](https://github.com/{{ sdk.gitUserName|url_encode }}/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/{{ sdk.gitUserName|url_encode }}/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
39
98
40
99
## License
41
100
42
-
Please see the [{{spec.licenseName}} license]({{spec.licenseURL}}) file for more information.
101
+
Please see the [{{spec.licenseName}} license]({{spec.licenseURL}}) file for more information.
0 commit comments