Skip to content

Commit 53c6dd6

Browse files
committed
Reduce memory usage in map
1 parent 617a3a8 commit 53c6dd6

File tree

1 file changed

+16
-30
lines changed

1 file changed

+16
-30
lines changed

widget/locale.go

+16-30
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
)
99

1010
const (
11-
localeDateFormatKey = "locale.date.format"
12-
localeWeekStartKey = "locale.date.startweek"
11+
localeDateFormatKey = "dateformat"
12+
localeWeekStartKey = "startofweek"
1313
)
1414

1515
var localeSettings = map[string]map[string]string{
@@ -18,64 +18,50 @@ var localeSettings = map[string]map[string]string{
1818
localeWeekStartKey: "Monday",
1919
},
2020
"BR": {
21-
localeDateFormatKey: "02/01/2006",
22-
localeWeekStartKey: "Sunday",
21+
localeWeekStartKey: "Sunday",
2322
},
2423
"BZ": {
25-
localeDateFormatKey: "02/01/2006",
26-
localeWeekStartKey: "Sunday",
24+
localeWeekStartKey: "Sunday",
2725
},
2826
"CA": {
29-
localeDateFormatKey: "02/01/2006",
30-
localeWeekStartKey: "Sunday",
27+
localeWeekStartKey: "Sunday",
3128
},
3229
"CO": {
33-
localeDateFormatKey: "02/01/2006",
34-
localeWeekStartKey: "Sunday",
30+
localeWeekStartKey: "Sunday",
3531
},
3632
"DO": {
37-
localeDateFormatKey: "02/01/2006",
38-
localeWeekStartKey: "Sunday",
33+
localeWeekStartKey: "Sunday",
3934
},
4035
"GT": {
41-
localeDateFormatKey: "02/01/2006",
42-
localeWeekStartKey: "Sunday",
36+
localeWeekStartKey: "Sunday",
4337
},
4438
"JP": {
45-
localeDateFormatKey: "02/01/2006",
46-
localeWeekStartKey: "Sunday",
39+
localeWeekStartKey: "Sunday",
4740
},
4841
"MX": {
49-
localeDateFormatKey: "02/01/2006",
50-
localeWeekStartKey: "Sunday",
42+
localeWeekStartKey: "Sunday",
5143
},
5244
"NI": {
53-
localeDateFormatKey: "02/01/2006",
54-
localeWeekStartKey: "Sunday",
45+
localeWeekStartKey: "Sunday",
5546
},
5647
"PE": {
57-
localeDateFormatKey: "02/01/2006",
58-
localeWeekStartKey: "Sunday",
48+
localeWeekStartKey: "Sunday",
5949
},
6050
"PA": {
61-
localeDateFormatKey: "02/01/2006",
62-
localeWeekStartKey: "Sunday",
51+
localeWeekStartKey: "Sunday",
6352
},
6453
"PY": {
65-
localeDateFormatKey: "02/01/2006",
66-
localeWeekStartKey: "Sunday",
54+
localeWeekStartKey: "Sunday",
6755
},
6856
"US": {
6957
localeDateFormatKey: "01/02/2006",
7058
localeWeekStartKey: "Sunday",
7159
},
7260
"VE": {
73-
localeDateFormatKey: "02/01/2006",
74-
localeWeekStartKey: "Sunday",
61+
localeWeekStartKey: "Sunday",
7562
},
7663
"ZA": {
77-
localeDateFormatKey: "02/01/2006",
78-
localeWeekStartKey: "Sunday",
64+
localeWeekStartKey: "Sunday",
7965
},
8066
}
8167

0 commit comments

Comments
 (0)