aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-05-14 07:52:02 -0300
committerEuAndreh <eu@euandre.org>2025-05-14 07:52:21 -0300
commitce954acce5c2f56a2ba677eb197b960cfb0589bf (patch)
tree3d27af51829f5efe571136de0814f8d1f84f9e23
parentsrc/gotext.go: Fix usage of `var` (diff)
downloadgotext-ce954acce5c2f56a2ba677eb197b960cfb0589bf.tar.gz
gotext-ce954acce5c2f56a2ba677eb197b960cfb0589bf.tar.xz
src/gotext.go: Group together type definitions
-rw-r--r--src/gotext.go27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/gotext.go b/src/gotext.go
index 1bc4929..152b33c 100644
--- a/src/gotext.go
+++ b/src/gotext.go
@@ -68,7 +68,7 @@ var (
-type msgID struct {
+type msgID struct{
msgidPlural string
comment string
fname string
@@ -76,6 +76,16 @@ type msgID struct {
formatHint string
}
+type argsT struct{
+ allArgs []string
+ subArgs []string
+ commentTag string
+ keyword string
+ keywordPlural string
+}
+
+
+
var msgIDs map[string][]msgID
func formatComment(com string) string {
@@ -351,21 +361,6 @@ func writePotFile(out io.Writer) {
}
-// FIXME: this must be setable via go-flags
-type optsT struct {
- AddCommentsTag string `long:"add-comments-tag" description:"place comment blocks starting with TAG and prceding keyword lines in output file"`
- Keyword string `short:"k" long:"keyword" default:"gt.Gettext" description:"look for WORD as the keyword for singular strings"`
- KeywordPlural string `long:"keyword-plural" default:"gt.NGettext" description:"look for WORD as the keyword for plural strings"`
-}
-
-type argsT struct{
- allArgs []string
- subArgs []string
- commentTag string
- keyword string
- keywordPlural string
-}
-
func usage(argv0 string, w io.Writer) {
fmt.Fprintf(
w,