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