GetAPIKeyPath returns the file path to the Google geocoding API key.
()
| 79 | |
| 80 | // GetAPIKeyPath returns the file path to the Google geocoding API key. |
| 81 | func GetAPIKeyPath() (string, error) { |
| 82 | dir, err := osutil.PerkeepConfigDir() |
| 83 | if err != nil { |
| 84 | return "", fmt.Errorf("could not get config dir: %v", err) |
| 85 | } |
| 86 | return filepath.Join(dir, apiKeyName), nil |
| 87 | } |
| 88 | |
| 89 | // GetAPIKey returns the Google geocoding API key stored in the Perkeep |
| 90 | // configuration directory as google-geocode.key. |
no test coverage detected