mirror of
https://github.com/spf13/viper
synced 2024-12-24 12:37:02 +00:00
format cleanup
This commit is contained in:
parent
33dd3593c9
commit
5197566d20
1 changed files with 94 additions and 94 deletions
|
@ -19,8 +19,8 @@ package vault
|
|||
*/
|
||||
|
||||
import (
|
||||
"os"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/xordataexchange/crypt/backend"
|
||||
|
@ -70,7 +70,7 @@ func (c *Client) acquireToken(role string, secret string) (string, error) {
|
|||
// this can be called before operations to ensure token is currentfg
|
||||
func (c *Client) renewToken() (string, error) {
|
||||
if c.secret_expires {
|
||||
if ((c.secret_ttl.Seconds() + c.secret_acq_at > float64(time.Now().Unix())) && c.secret_ttl != 0) {
|
||||
if (c.secret_ttl.Seconds()+c.secret_acq_at > float64(time.Now().Unix())) && c.secret_ttl != 0 {
|
||||
return c.acquireToken(os.Getenv("VAULT_ROLE_ID"), os.Getenv("VAULT_SECRET_ID"))
|
||||
} else {
|
||||
return "", nil
|
||||
|
|
Loading…
Reference in a new issue