Go is in development for v1. Interested in contributing or chatting with us?Get in touch!
Go - Collection.Query.Limit()
Limit the number of results returned by a query.
import (
  "fmt"
  "github.com/nitrictech/go-sdk/nitric"
)
func main() {
  profiles, err := nitric.NewCollection("profiles").With(nitric.CollectionReading, nitric.CollectionWriting, nitric.CollectionDeleting)
  if err != nil {
    return
  }
  profilesQuery := profiles.Query().Limit(10)
  if err := nitric.Run(); err != nil {
    fmt.Println(err)
  }
}
Parameters
- Name
 limit- Required
 - Required
 - Type
 - int
 - Description
 The limit to apply to the query.