- fixed the parsing of the json files
- fixed the getDurationWithin(); was returning in ms not seconds
This commit is contained in:
parent
08d1667cb6
commit
9a14bbc919
4
utils.go
4
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
|
||||
|
|
Reference in a new issue