Add omitempty to JSON fields in alert, forecast, and observation services
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
This commit is contained in:
@@ -21,13 +21,13 @@ type Response struct {
|
||||
}
|
||||
|
||||
type AlertResponse struct {
|
||||
Effective *time.Time `json:"effective"`
|
||||
Expires *time.Time `json:"expires"`
|
||||
Severity *string `json:"severity"`
|
||||
Event *string `json:"event"`
|
||||
Headline *string `json:"headline"`
|
||||
Instruction *string `json:"instruction"`
|
||||
Description *string `json:"description"`
|
||||
Effective *time.Time `json:"effective,omitempty"`
|
||||
Expires *time.Time `json:"expires,omitempty"`
|
||||
Severity *string `json:"severity,omitempty"`
|
||||
Event *string `json:"event,omitempty"`
|
||||
Headline *string `json:"headline,omitempty"`
|
||||
Instruction *string `json:"instruction,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
func (s *Service) GetCurrent(ctx context.Context) (Response, error) {
|
||||
|
||||
Reference in New Issue
Block a user