Minor changes and fixes

This commit is contained in:
David J. Allen 2024-05-07 16:51:07 -06:00
parent 6bf9035d96
commit b873613939
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
4 changed files with 17 additions and 6 deletions

View file

@ -68,7 +68,11 @@ func LoadAccessToken() (string, error) {
}
// TODO: try to load token from config
return "", fmt.Errorf("could not load from environment variable or file")
testToken = viper.GetString("access_token")
if testToken != "" {
return testToken, nil
}
return "", fmt.Errorf("could not load token from environment variable, file, or config")
}
func init() {