Go - Collection.Doc.Delete()
Delete a document from a collection.
import ("context""fmt""github.com/nitrictech/go-sdk/nitric")func main() {profiles, err := nitric.NewCollection("profiles").With(nitric.CollectionDeleting)if err != nil {return}drakeProfileRef := profiles.Doc("Drake Mallard")err = drakeProfileRef.Delete(context.TODO())if err != nil {return}nitric.Run()}
Parameters
- Name
ctx
- Required
- Required
- Type
- context
- Description
The context of the call, used for tracing.
See also
Last updated on Oct 11, 2024