Skip to content

Commit 2f11fcd

Browse files
committed
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 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.
1 parent 37f474c commit 2f11fcd

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

domain.go

-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import (
1010
"strings"
1111
"sync"
1212

13-
"golang.org/x/text/language"
14-
1513
"github.com/leonelquinteros/gotext/plurals"
1614
)
1715

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

2321
// Language header
2422
Language string
25-
tag language.Tag
2623

2724
// Plural-Forms header
2825
PluralForms string
@@ -143,7 +140,6 @@ func (do *Domain) parseHeaders() {
143140

144141
// Get/save needed headers
145142
do.Language = do.Headers.Get(languageKey)
146-
do.tag = language.Make(do.Language)
147143
do.PluralForms = do.Headers.Get(pluralFormsKey)
148144

149145
// Parse Plural-Forms formula

go.mod

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ module github.com/leonelquinteros/gotext
22

33
// go: no requirements found in Gopkg.lock
44

5-
require (
6-
golang.org/x/text v0.3.8
7-
golang.org/x/tools v0.1.12
8-
)
5+
require golang.org/x/tools v0.1.12
96

107
go 1.13

go.sum

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

0 commit comments

Comments
 (0)