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

Function GetPath

pkg/cli/config/config.go:52–59  ·  view source on GitHub ↗

GetPath returns the path to the dnote config file

(ctx context.DnoteCtx)

Source from the content-addressed store, hash-verified

50
51// GetPath returns the path to the dnote config file
52func GetPath(ctx context.DnoteCtx) string {
53 legacyPath, ok := checkLegacyPath(ctx)
54 if ok {
55 return legacyPath
56 }
57
58 return fmt.Sprintf("%s/%s/%s", ctx.Paths.Config, consts.DnoteDirName, consts.ConfigFilename)
59}
60
61// Read reads the config file
62func Read(ctx context.DnoteCtx) (Config, error) {

Callers 3

initConfigFileFunction · 0.92
ReadFunction · 0.70
WriteFunction · 0.70

Calls 1

checkLegacyPathFunction · 0.85

Tested by

no test coverage detected