CredentialsPath returns ~/.pad/credentials.json.
()
| 78 | |
| 79 | // CredentialsPath returns ~/.pad/credentials.json. |
| 80 | func CredentialsPath() (string, error) { |
| 81 | homeDir, err := os.UserHomeDir() |
| 82 | if err != nil { |
| 83 | return "", fmt.Errorf("get home directory: %w", err) |
| 84 | } |
| 85 | return filepath.Join(homeDir, ".pad", "credentials.json"), nil |
| 86 | } |
| 87 | |
| 88 | // credentialsPath is retained for internal call sites. |
| 89 | func credentialsPath() (string, error) { |
no test coverage detected