in cmd/ip-masq-agent-v2/ip-masq-agent.go [70:82]
func (d *Duration) UnmarshalJSON(json []byte) error {
if json[0] == '"' {
s := string(json[1 : len(json)-1])
t, err := time.ParseDuration(s)
if err != nil {
return err
}
*d = Duration(t)
return nil
}
s := string(json)
return fmt.Errorf("expected string value for unmarshal to field of type Duration, got %q", s)
}