GetPath returns the path to the dnote config file
(ctx context.DnoteCtx)
| 50 | |
| 51 | // GetPath returns the path to the dnote config file |
| 52 | func 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 |
| 62 | func Read(ctx context.DnoteCtx) (Config, error) { |
no test coverage detected