holidayapi-go/model.go
Alexys Lozada 5058a30bc2 Create a ResponseHoliday struct
For a better control over the returned data, a structure is created
that maps the response.
2017-08-16 14:44:54 -05:00

14 lines
313 B
Go

package holidayapi
type Holiday struct {
Name string `json:"name"`
Date string `json:"date"`
Observed string `json:"observed"`
Public string `json:"public"`
}
type ResponseHoliday struct {
Status int `json:"status"`
Error string `json:"error"`
Holidays map[string][]Holiday `json:"holidays"`
}