1
0
Fork 0
mirror of synced 2024-08-01 03:21:46 +12:00
appwrite/app/sdks/go/docs/examples/Database/update-document.md

35 lines
716 B
Markdown
Raw Normal View History

2019-10-19 07:42:02 +13:00
# Database Examples
## UpdateDocument
```go
package appwrite-updatedocument
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
func main() {
// Create a Client
var clt := appwrite.Client{}
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call UpdateDocument method and handle results
2019-10-22 06:15:27 +13:00
var res, err := srv.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", "{}", [], [])
2019-10-19 07:42:02 +13:00
if err != nil {
panic(err)
}
fmt.Println(res)
}
```