fixup: catch err from parseduration

This commit is contained in:
Matt Leung 2018-04-24 15:26:12 -07:00
parent 79428aa231
commit c4fe6496b5

View file

@ -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
}