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

Function paths

internal/cmd/common.go:13–27  ·  view source on GitHub ↗
(project string)

Source from the content-addressed store, hash-verified

11)
12
13func paths(project string) (string, string, error) {
14 home := gap.NewScope(gap.User, "tasktimer")
15
16 logfile, err := home.LogPath(project + ".log")
17 if err != nil {
18 return "", "", err
19 }
20
21 dbfile, err := home.DataPath(project + ".db")
22 if err != nil {
23 return "", "", err
24 }
25
26 return logfile, dbfile, nil
27}
28
29func setup(project string) (*badger.DB, io.Closer, error) {
30 logfile, dbfile, err := paths(project)

Callers 2

setupFunction · 0.85
newPathsCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected