Remove unused dependency

While figuring out what both dependencies in gotext are used for, I
quickly noticed that one is actually useless at the moment. The `tag`
field is only set but never used, so it can be dropped. It was
introduced three years ago in bb276626f3
and was even not used back then. I didn't check the history any further,
though. Removing the private field allows getting rid of a third-party
dependency entirely.
This commit is contained in:
Lysander Trischler 2023-09-24 22:28:12 +02:00
parent 37f474cfb0
commit 2f11fcd5f2
3 changed files with 1 additions and 10 deletions

View file

@ -10,8 +10,6 @@ import (
"strings"
"sync"
"golang.org/x/text/language"
"github.com/leonelquinteros/gotext/plurals"
)
@ -22,7 +20,6 @@ type Domain struct {
// Language header
Language string
tag language.Tag
// Plural-Forms header
PluralForms string
@ -143,7 +140,6 @@ func (do *Domain) parseHeaders() {
// Get/save needed headers
do.Language = do.Headers.Get(languageKey)
do.tag = language.Make(do.Language)
do.PluralForms = do.Headers.Get(pluralFormsKey)
// Parse Plural-Forms formula

5
go.mod
View file

@ -2,9 +2,6 @@ module github.com/leonelquinteros/gotext
// go: no requirements found in Gopkg.lock
require (
golang.org/x/text v0.3.8
golang.org/x/tools v0.1.12
)
require golang.org/x/tools v0.1.12
go 1.13

2
go.sum
View file

@ -19,8 +19,6 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=