fixup: catch err from parseduration
This commit is contained in:
parent
79428aa231
commit
c4fe6496b5
1 changed files with 4 additions and 0 deletions
|
@ -43,5 +43,9 @@ func getKubernetesToken(addr, role, mountPoint, tokenFile string) (string, time.
|
|||
}
|
||||
|
||||
ttl, err := time.ParseDuration(resp.Auth.Lease)
|
||||
if err != nil {
|
||||
return "", 0, err
|
||||
}
|
||||
|
||||
return resp.Auth.Token, ttl, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue