MCPcopy Index your code
hub / github.com/dnote/dnote / NewCmd

Function NewCmd

pkg/cli/cmd/logout/logout.go:40–52  ·  view source on GitHub ↗

NewCmd returns a new logout command

(ctx context.DnoteCtx)

Source from the content-addressed store, hash-verified

38
39// NewCmd returns a new logout command
40func NewCmd(ctx context.DnoteCtx) *cobra.Command {
41 cmd := &cobra.Command{
42 Use: "logout",
43 Short: "Logout from the server",
44 Example: example,
45 RunE: newRun(ctx),
46 }
47
48 f := cmd.Flags()
49 f.StringVar(&apiEndpointFlag, "apiEndpoint", "", "API endpoint to connect to (defaults to value in config)")
50
51 return cmd
52}
53
54// Do performs logout
55func Do(ctx context.DnoteCtx) error {

Callers 1

mainFunction · 0.92

Calls 1

newRunFunction · 0.70

Tested by

no test coverage detected