From 72f2d5ccabe21e7bf4f78e07f7ede7adac5ea8fe Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 6 Feb 2024 13:15:59 +0200 Subject: [PATCH] Remove holidays slice length --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 57e3f8d..6c2adc6 100644 --- a/main.go +++ b/main.go @@ -50,10 +50,10 @@ func main() { } } -func getHolidays(year int) ([15]Holiday, error) { +func getHolidays(year int) ([]Holiday, error) { orthodoxEaster, err := eastertime.OrthodoxByYear(year) if err != nil { - return [15]Holiday{}, errors.New("the year must be greater than 325") + return []Holiday{}, errors.New("the year must be greater than 325") } easter := carbon.CreateFromStdTime(orthodoxEaster) @@ -62,7 +62,7 @@ func getHolidays(year int) ([15]Holiday, error) { whitMonday := easter.AddDays(50) whitSunday := whitMonday.SubDay() - holidays := [15]Holiday{ + holidays := []Holiday{ { Name: "Anul nou", Date: carbon.CreateFromDate(year, 1, 1).ToDateString(),