Files
m3o-go/examples/holidays/list/getHolidays/main.go
2021-12-09 15:06:12 +00:00

18 lines
308 B
Go
Executable File

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