aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-05-14 08:53:03 -0300
committerEuAndreh <eu@euandre.org>2025-05-14 08:55:01 -0300
commit542c30bba0411439bd129ac359015a5732efbba3 (patch)
tree8ddf55b3459b5e1414e1c98022086047a9f3e02e
parentRemove global `msgIDs` shared variable (diff)
downloadgotext-542c30bba0411439bd129ac359015a5732efbba3.tar.gz
gotext-542c30bba0411439bd129ac359015a5732efbba3.tar.xz
src/gotext.go: Cleanup LC_* comments and make them consts
Diffstat (limited to '')
-rw-r--r--src/gotext.go36
1 files changed, 10 insertions, 26 deletions
diff --git a/src/gotext.go b/src/gotext.go
index 0ac104e..480a812 100644
--- a/src/gotext.go
+++ b/src/gotext.go
@@ -29,6 +29,16 @@ import "C"
+const (
+ LC_ALL = uint(C.LC_ALL)
+ LC_COLLATE = uint(C.LC_COLLATE)
+ LC_CTYPE = uint(C.LC_CTYPE)
+ LC_MESSAGES = uint(C.LC_MESSAGES)
+ LC_MONETARY = uint(C.LC_MONETARY)
+ LC_NUMERIC = uint(C.LC_NUMERIC)
+ LC_TIME = uint(C.LC_TIME)
+)
+
var (
formatTime = func() string {
if false {
@@ -37,32 +47,6 @@ var (
}
return "2015-06-30T14:48:00-03:00"
}
-
- // FIXME: are these comments useful
-
- // LC_ALL is for all of the locale.
- LC_ALL = uint(C.LC_ALL)
-
- // LC_COLLATE is for regular expression matching (it determines the meaning of
- // range expressions and equivalence classes) and string collation.
- LC_COLLATE = uint(C.LC_COLLATE)
-
- // LC_CTYPE is for regular expression matching, character classification,
- // conversion, case-sensitive comparison, and wide character functions.
- LC_CTYPE = uint(C.LC_CTYPE)
-
- // LC_MESSAGES is for localizable natural-language messages.
- LC_MESSAGES = uint(C.LC_MESSAGES)
-
- // LC_MONETARY is for monetary formatting.
- LC_MONETARY = uint(C.LC_MONETARY)
-
- // LC_NUMERIC is for number formatting (such as the decimal point and the
- // thousands separator).
- LC_NUMERIC = uint(C.LC_NUMERIC)
-
- // LC_TIME is for time and date formatting.
- LC_TIME = uint(C.LC_TIME)
)