MCPcopy Create free account
hub / github.com/caarlos0/tasktimer / newPathsCmd

Function newPathsCmd

internal/cmd/paths.go:13–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13func newPathsCmd() *pathsCmd {
14 cmd := &cobra.Command{
15 Use: "paths",
16 Short: "Print the paths being used for logs, data et al",
17 Args: cobra.NoArgs,
18 RunE: func(cmd *cobra.Command, args []string) error {
19 project := cmd.Parent().Flag("project").Value.String()
20 logfile, dbfile, err := paths(project)
21 if err != nil {
22 return err
23 }
24 fmt.Println("Database path:", dbfile)
25 fmt.Println("Log path: ", logfile)
26 return nil
27 },
28 }
29 return &pathsCmd{cmd: cmd}
30}

Callers 1

newRootCmdFunction · 0.85

Calls 1

pathsFunction · 0.85

Tested by

no test coverage detected