mirror of
https://github.com/TwiN/gatus.git
synced 2025-05-30 22:56:04 +02:00
Omit empty hostname and errors field
This commit is contained in:
parent
a94c480c22
commit
dd70136e6c
@ -13,7 +13,7 @@ type Result struct {
|
|||||||
DNSRCode string `json:"-"`
|
DNSRCode string `json:"-"`
|
||||||
|
|
||||||
// Hostname extracted from Endpoint.URL
|
// Hostname extracted from Endpoint.URL
|
||||||
Hostname string `json:"hostname"`
|
Hostname string `json:"hostname,omitempty"`
|
||||||
|
|
||||||
// IP resolved from the Endpoint URL
|
// IP resolved from the Endpoint URL
|
||||||
IP string `json:"-"`
|
IP string `json:"-"`
|
||||||
@ -25,7 +25,7 @@ type Result struct {
|
|||||||
Duration time.Duration `json:"duration"`
|
Duration time.Duration `json:"duration"`
|
||||||
|
|
||||||
// Errors encountered during the evaluation of the Endpoint's health
|
// Errors encountered during the evaluation of the Endpoint's health
|
||||||
Errors []string `json:"errors"`
|
Errors []string `json:"errors,omitempty"`
|
||||||
|
|
||||||
// ConditionResults results of the Endpoint's conditions
|
// ConditionResults results of the Endpoint's conditions
|
||||||
ConditionResults []*ConditionResult `json:"conditionResults"`
|
ConditionResults []*ConditionResult `json:"conditionResults"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user