1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-30 10:11:23 +02:00

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
}