1
0
Fork 0
mirror of synced 2024-07-13 10:26:15 +12:00
appwrite/app/sdks/go/docs/examples/Database/update-collection.md
2019-10-21 21:03:06 +03:00

711 B

Database Examples

UpdateCollection

    package appwrite-updatecollection

    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 UpdateCollection method and handle results
        var res, err := srv.UpdateCollection("[COLLECTION_ID]", "[NAME]", [], [])
        if err != nil {
            panic(err)
        }

        fmt.Println(res)
    }