MCPcopy
hub / github.com/etcd-io/bbolt / AddFlags

Method AddFlags

cmd/bbolt/command/command_compact.go:41–46  ·  view source on GitHub ↗
(fs *pflag.FlagSet)

Source from the content-addressed store, hash-verified

39}
40
41func (o *compactOptions) AddFlags(fs *pflag.FlagSet) {
42 fs.StringVarP(&o.dstPath, "output", "o", "", "")
43 fs.Int64Var(&o.txMaxSize, "tx-max-size", 65536, "")
44 fs.BoolVar(&o.dstNoSync, "no-sync", false, "")
45 _ = cobra.MarkFlagRequired(fs, "output")
46}
47
48func (o *compactOptions) Validate(srcPath string) (err error) {
49 if o.dstPath == "" {

Callers 1

newCompactCommandFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected