From 548090e67f66acf84385c4152ca464e52d3e3319 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 13 Sep 2024 13:01:48 +0200 Subject: Migrate away from templ and towards html/template --- lib/countries.go | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 lib/countries.go (limited to 'lib/countries.go') diff --git a/lib/countries.go b/lib/countries.go deleted file mode 100644 index 565f61c..0000000 --- a/lib/countries.go +++ /dev/null @@ -1,46 +0,0 @@ -package lib - -import ( - "slices" - - "golang.org/x/text/collate" - "golang.org/x/text/language" -) - -type Country struct { - Code, Name string -} - -func SortedCountries(p Printer) []Country { - xs := []Country{ - {Code: "ad", Name: p.T("Andorra")}, - {Code: "at", Name: p.T("Austria")}, - {Code: "be", Name: p.T("Belgium")}, - {Code: "cy", Name: p.T("Cyprus")}, - {Code: "de", Name: p.T("Germany")}, - {Code: "ee", Name: p.T("Estonia")}, - {Code: "es", Name: p.T("Spain")}, - {Code: "fi", Name: p.T("Finland")}, - {Code: "fr", Name: p.T("France")}, - {Code: "gr", Name: p.T("Greece")}, - {Code: "hr", Name: p.T("Croatia")}, - {Code: "ie", Name: p.T("Ireland")}, - {Code: "it", Name: p.T("Italy")}, - {Code: "lt", Name: p.T("Lithuania")}, - {Code: "lu", Name: p.T("Luxembourg")}, - {Code: "lv", Name: p.T("Latvia")}, - {Code: "mc", Name: p.T("Monaco")}, - {Code: "mt", Name: p.T("Malta")}, - {Code: "nl", Name: p.T("Netherlands")}, - {Code: "pt", Name: p.T("Portugal")}, - {Code: "si", Name: p.T("Slovenia")}, - {Code: "sk", Name: p.T("Slovakia")}, - {Code: "sm", Name: p.T("San Marino")}, - {Code: "va", Name: p.T("Vatican City")}, - } - c := collate.New(language.MustParse(p.Locale.Bcp)) - slices.SortFunc(xs, func(x, y Country) int { - return c.CompareString(x.Name, y.Name) - }) - return xs -} -- cgit v1.2.3