MCPcopy
hub / github.com/dnote/dnote / NewCmd

Function NewCmd

pkg/cli/cmd/find/find.go:52–66  ·  view source on GitHub ↗

NewCmd returns a new remove command

(ctx context.DnoteCtx)

Source from the content-addressed store, hash-verified

50
51// NewCmd returns a new remove command
52func NewCmd(ctx context.DnoteCtx) *cobra.Command {
53 cmd := &cobra.Command{
54 Use: "find",
55 Short: "Find notes by keywords",
56 Aliases: []string{"f"},
57 Example: example,
58 PreRunE: preRun,
59 RunE: newRun(ctx),
60 }
61
62 f := cmd.Flags()
63 f.StringVarP(&bookName, "book", "b", "", "book name to find notes in")
64
65 return cmd
66}
67
68// noteInfo is an information about the note to be printed on screen
69type noteInfo struct {

Callers 1

mainFunction · 0.92

Calls 1

newRunFunction · 0.70

Tested by

no test coverage detected