Skip to content

Commit

Permalink
Remove unused dependency
Browse files Browse the repository at this point in the history
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 bb27662
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.
  • Loading branch information
der-lyse committed Sep 24, 2023
1 parent 37f474c commit 2f11fcd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"strings"
"sync"

"golang.org/x/text/language"

"github.com/leonelquinteros/gotext/plurals"
)

Expand All @@ -22,7 +20,6 @@ type Domain struct {

// Language header
Language string
tag language.Tag

// Plural-Forms header
PluralForms string
Expand Down Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 2f11fcd

Please sign in to comment.