mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
migrate go version to 1.17 (#203)
* migrate go version to 1.17 * update contributing
This commit is contained in:
18
vendor/github.com/go-playground/universal-translator/Makefile
generated
vendored
Normal file
18
vendor/github.com/go-playground/universal-translator/Makefile
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
GOCMD=GO111MODULE=on go
|
||||
|
||||
linters-install:
|
||||
@golangci-lint --version >/dev/null 2>&1 || { \
|
||||
echo "installing linting tools..."; \
|
||||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.41.1; \
|
||||
}
|
||||
|
||||
lint: linters-install
|
||||
golangci-lint run
|
||||
|
||||
test:
|
||||
$(GOCMD) test -cover -race ./...
|
||||
|
||||
bench:
|
||||
$(GOCMD) test -bench=. -benchmem ./...
|
||||
|
||||
.PHONY: test lint linters-install
|
6
vendor/github.com/go-playground/universal-translator/README.md
generated
vendored
6
vendor/github.com/go-playground/universal-translator/README.md
generated
vendored
@ -1,5 +1,5 @@
|
||||
## universal-translator
|
||||
<img align="right" src="https://raw.githubusercontent.com/go-playground/universal-translator/master/logo.png">
|
||||
<img align="right" src="https://raw.githubusercontent.com/go-playground/universal-translator/master/logo.png">
|
||||
[](https://travis-ci.org/go-playground/universal-translator)
|
||||
[](https://coveralls.io/github/go-playground/universal-translator)
|
||||
[](https://goreportcard.com/report/github.com/go-playground/universal-translator)
|
||||
@ -18,7 +18,7 @@ use in your applications.
|
||||
|
||||
Features
|
||||
--------
|
||||
- [x] Rules generated from the [CLDR](http://cldr.unicode.org/index/downloads) data, v30.0.3
|
||||
- [x] Rules generated from the [CLDR](http://cldr.unicode.org/index/downloads) data, v36.0.1
|
||||
- [x] Contains Cardinal, Ordinal and Range Plural Rules
|
||||
- [x] Contains Month, Weekday and Timezone translations built in
|
||||
- [x] Contains Date & Time formatting functions
|
||||
@ -51,7 +51,7 @@ Please see https://godoc.org/github.com/go-playground/universal-translator for u
|
||||
|
||||
File formatting
|
||||
--------------
|
||||
All types, Plain substitution, Cardinal, Ordinal and Range translations can all be contained withing the same file(s);
|
||||
All types, Plain substitution, Cardinal, Ordinal and Range translations can all be contained within the same file(s);
|
||||
they are only separated for easy viewing.
|
||||
|
||||
##### Examples:
|
||||
|
5
vendor/github.com/go-playground/universal-translator/go.mod
generated
vendored
5
vendor/github.com/go-playground/universal-translator/go.mod
generated
vendored
@ -1,5 +0,0 @@
|
||||
module github.com/go-playground/universal-translator
|
||||
|
||||
go 1.13
|
||||
|
||||
require github.com/go-playground/locales v0.13.0
|
4
vendor/github.com/go-playground/universal-translator/go.sum
generated
vendored
4
vendor/github.com/go-playground/universal-translator/go.sum
generated
vendored
@ -1,4 +0,0 @@
|
||||
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
2
vendor/github.com/go-playground/universal-translator/import_export.go
generated
vendored
2
vendor/github.com/go-playground/universal-translator/import_export.go
generated
vendored
@ -257,6 +257,8 @@ func (t *UniversalTranslator) ImportByReader(format ImportExportFormat, reader i
|
||||
func stringToPR(s string) locales.PluralRule {
|
||||
|
||||
switch s {
|
||||
case "Zero":
|
||||
return locales.PluralRuleZero
|
||||
case "One":
|
||||
return locales.PluralRuleOne
|
||||
case "Two":
|
||||
|
12
vendor/github.com/go-playground/universal-translator/translator.go
generated
vendored
12
vendor/github.com/go-playground/universal-translator/translator.go
generated
vendored
@ -159,13 +159,13 @@ func (t *translator) AddCardinal(key interface{}, text string, rule locales.Plur
|
||||
}
|
||||
|
||||
} else {
|
||||
tarr = make([]*transText, 7, 7)
|
||||
tarr = make([]*transText, 7)
|
||||
t.cardinalTanslations[key] = tarr
|
||||
}
|
||||
|
||||
trans := &transText{
|
||||
text: text,
|
||||
indexes: make([]int, 2, 2),
|
||||
indexes: make([]int, 2),
|
||||
}
|
||||
|
||||
tarr[rule] = trans
|
||||
@ -211,13 +211,13 @@ func (t *translator) AddOrdinal(key interface{}, text string, rule locales.Plura
|
||||
}
|
||||
|
||||
} else {
|
||||
tarr = make([]*transText, 7, 7)
|
||||
tarr = make([]*transText, 7)
|
||||
t.ordinalTanslations[key] = tarr
|
||||
}
|
||||
|
||||
trans := &transText{
|
||||
text: text,
|
||||
indexes: make([]int, 2, 2),
|
||||
indexes: make([]int, 2),
|
||||
}
|
||||
|
||||
tarr[rule] = trans
|
||||
@ -261,13 +261,13 @@ func (t *translator) AddRange(key interface{}, text string, rule locales.PluralR
|
||||
}
|
||||
|
||||
} else {
|
||||
tarr = make([]*transText, 7, 7)
|
||||
tarr = make([]*transText, 7)
|
||||
t.rangeTanslations[key] = tarr
|
||||
}
|
||||
|
||||
trans := &transText{
|
||||
text: text,
|
||||
indexes: make([]int, 4, 4),
|
||||
indexes: make([]int, 4),
|
||||
}
|
||||
|
||||
tarr[rule] = trans
|
||||
|
Reference in New Issue
Block a user