This commit is contained in:
Arturo Filastò 2020-01-07 16:42:04 +02:00
parent 24316728b9
commit 2cb6661340

View File

@ -30,12 +30,12 @@ func (h Psiphon) GetTestKeys(tk map[string]interface{}) (interface{}, error) {
testKeys := PsiphonTestKeys{IsAnomaly: false, Failure: ""}
if tk["failure"] != nil {
testKeys.IsAnomaly = true
testKeys.Failure, ok = tk["failure"].(string)
testKeys.Failure, ok := tk["failure"].(string)
if !ok {
err = errors.Wrap(err, "failure key invalid")
}
}
testKeys.BootstrapTime, ok = tk["bootstrap_time"].(float64)
testKeys.BootstrapTime, ok := tk["bootstrap_time"].(float64)
if !ok {
err = errors.Wrap(err, "bootstrap_time key invalid")
}