From ce954acce5c2f56a2ba677eb197b960cfb0589bf Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 14 May 2025 07:52:02 -0300 Subject: src/gotext.go: Group together type definitions --- src/gotext.go | 27 +++++++++++---------------- 1 file 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, -- cgit v1.2.3