Files
m3o-go/examples/holidays/list/getHolidays.go
2021-10-29 06:38:17 +00:00

18 lines
329 B
Go
Executable File

package example
import (
"fmt"
"os"
"github.com/go.m3o.com/holidays"
)
// List the holiday dates for a given country and year
func GetHolidays() {
holidaysService := holidays.NewHolidaysService(os.Getenv("M3O_API_TOKEN"))
rsp, err := holidaysService.List(&holidays.ListRequest{
Year: 2022,
})
fmt.Println(rsp, err)
}