Use AuthToken function to retrieve AuthToken instead of GetOrDefault (#6878)
This commit is contained in:
parent
55578208a6
commit
83d080488e
1 changed files with 2 additions and 3 deletions
|
|
@ -52,9 +52,8 @@ func tokenRun(opts *TokenOptions) error {
|
|||
return err
|
||||
}
|
||||
|
||||
key := "oauth_token"
|
||||
val, err := cfg.GetOrDefault(hostname, key)
|
||||
if err != nil {
|
||||
val, _ := cfg.AuthToken(hostname)
|
||||
if val == "" {
|
||||
return fmt.Errorf("no oauth token")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue