diff --git a/agent/structs/structs.go b/agent/structs/structs.go index 14b50e5e67..1f0f7f3df0 100644 --- a/agent/structs/structs.go +++ b/agent/structs/structs.go @@ -322,7 +322,6 @@ func (r *DeregisterRequest) RequestDatacenter() string { return r.Datacenter } - func (r *DeregisterRequest) UnmarshalJSON(data []byte) error { type Alias DeregisterRequest aux := &struct { @@ -331,14 +330,13 @@ func (r *DeregisterRequest) UnmarshalJSON(data []byte) error { }{ Alias: (*Alias)(r), } - + if err := lib.UnmarshalJSON(data, &aux); err != nil { return err } return nil } - // QuerySource is used to pass along information about the source node // in queries so that we can adjust the response based on its network // coordinates.