MCPcopy Index your code
hub / github.com/perkeep/perkeep / GetAPIKeyPath

Function GetAPIKeyPath

internal/geocode/geocode.go:81–87  ·  view source on GitHub ↗

GetAPIKeyPath returns the file path to the Google geocoding API key.

()

Source from the content-addressed store, hash-verified

79
80// GetAPIKeyPath returns the file path to the Google geocoding API key.
81func 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.

Callers 1

checkGeoKeyFunction · 0.92

Calls 1

PerkeepConfigDirFunction · 0.92

Tested by

no test coverage detected