diff --git a/utils.go b/utils.go index dd4bf1b..f0625a7 100644 --- a/utils.go +++ b/utils.go @@ -98,7 +98,7 @@ func readJSONFile(filename string) (map[string]string, error) { return data, err } // unmarshall the data - err = json.Unmarshal(content, data) + err = json.Unmarshal(content, &data) if err != nil { return data, err } @@ -126,7 +126,7 @@ func readYAMLFile(filename string) (map[string]string, error) { // min : the smallest number we can accept // max : the largest number we can accept func getDurationWithin(min, max int) time.Duration { - return time.Duration(rand.Intn(max-min) + min) + return time.Duration(rand.Intn(max-min) + min) * time.Second } // getEnv checks to see if an environment variable exists otherwise uses the default diff --git a/vault.go b/vault.go index de05117..3eecea9 100644 --- a/vault.go +++ b/vault.go @@ -89,6 +89,7 @@ func NewVaultService(url string) (*VaultService, error) { if service.token, err = service.authenticate(options.vaultAuthOptions); err != nil { return nil, err } + // step: set the token for the client service.client.SetToken(service.token)