Skip to content

Commit

Permalink
Explicitly ignore ServiceID and service_id fields when decoding Check…
Browse files Browse the repository at this point in the history
…Type from JSON
  • Loading branch information
mkeeler committed Dec 4, 2019
1 parent 14eafef commit 39d1eaf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent/structs/check_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ func (t *CheckType) UnmarshalJSON(data []byte) (err error) {
DockerContainerIDSnake string `json:"docker_container_id"`
TLSSkipVerifySnake bool `json:"tls_skip_verify"`

// These are going to be ignored but since we are disallowing unknown fields
// during parsing we have to be explicit about parsing but not using these.
ServiceID string `json:"ServiceID"`
ServiceIDSnake string `json:"service_id"`

*Alias
}{
Alias: (*Alias)(t),
Expand Down

0 comments on commit 39d1eaf

Please sign in to comment.