diff options
author | EuAndreh <eu@euandre.org> | 2025-05-14 07:52:02 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-05-14 07:52:21 -0300 |
commit | ce954acce5c2f56a2ba677eb197b960cfb0589bf (patch) | |
tree | 3d27af51829f5efe571136de0814f8d1f84f9e23 | |
parent | src/gotext.go: Fix usage of `var` (diff) | |
download | gotext-ce954acce5c2f56a2ba677eb197b960cfb0589bf.tar.gz gotext-ce954acce5c2f56a2ba677eb197b960cfb0589bf.tar.xz |
src/gotext.go: Group together type definitions
-rw-r--r-- | src/gotext.go | 27 |
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, |