DefaultConfigPath returns the default user config file path.
()
| 142 | |
| 143 | // DefaultConfigPath returns the default user config file path. |
| 144 | func DefaultConfigPath() (string, error) { |
| 145 | configDir, err := os.UserConfigDir() |
| 146 | if err != nil { |
| 147 | return "", err |
| 148 | } |
| 149 | return filepath.Join(configDir, "pikpakcli", "config.yml"), nil |
| 150 | } |
| 151 | |
| 152 | func readConfig(path string) error { |
| 153 | f, err := os.Open(path) |
no outgoing calls
no test coverage detected