MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / AddFlags

Method AddFlags

app/cli/cmd/options/pagination.go:29–37  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

27var _ Interface = (*PaginationOpts)(nil)
28
29func (o *PaginationOpts) AddFlags(cmd *cobra.Command) {
30 defaultLimit := 10
31 if o.DefaultLimit != 0 {
32 defaultLimit = o.DefaultLimit
33 }
34
35 cmd.PersistentFlags().IntVar(&o.Limit, "limit", defaultLimit, "number of items to show")
36 cmd.PersistentFlags().StringVar(&o.NextCursor, "next", "", "cursor to load the next page")
37}
38
39type OffsetPaginationOpts struct {
40 DefaultLimit int

Callers 1

newReferrerDiscoverCmdFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected