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