Skip to content

Commit f87b140

Browse files
author
Dean Karn
authored
Merge pull request #22 from go-playground/upgrade-to-go-modules
covert to Go Modules
2 parents 7120149 + 8a2a572 commit f87b140

File tree

17 files changed

+50
-13
lines changed

17 files changed

+50
-13
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ _testmain.go
2121

2222
*.exe
2323
*.test
24-
*.prof
24+
*.prof
25+
*.coverprofile

.travis.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: go
2+
go:
3+
- 1.13.4
4+
- tip
5+
matrix:
6+
allow_failures:
7+
- go: tip
8+
9+
notifications:
10+
email:
11+
recipients: dean.karn@gmail.com
12+
on_success: change
13+
on_failure: always
14+
15+
before_install:
16+
- go install github.com/mattn/goveralls
17+
18+
# Only clone the most recent commit.
19+
git:
20+
depth: 1
21+
22+
script:
23+
- go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./...
24+
25+
after_success: |
26+
[ $TRAVIS_GO_VERSION = 1.13.4 ] &&
27+
goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## universal-translator
2-
<img align="right" src="https://raw.githubusercontent.com/go-playground/universal-translator/master/logo.png">![Project status](https://img.shields.io/badge/version-0.16.0-green.svg)
3-
[![Build Status](https://semaphoreci.com/api/v1/joeybloggs/universal-translator/branches/master/badge.svg)](https://semaphoreci.com/joeybloggs/universal-translator)
2+
<img align="right" src="https://raw.githubusercontent.com/go-playground/universal-translator/master/logo.png">![Project status](https://img.shields.io/badge/version-0.17.0-green.svg)
3+
[![Build Status](https://travis-ci.org/go-playground/universal-translator.svg?branch=master)](https://travis-ci.org/go-playground/universal-translator)
44
[![Coverage Status](https://coveralls.io/repos/github/go-playground/universal-translator/badge.svg)](https://coveralls.io/github/go-playground/universal-translator)
55
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/universal-translator)](https://goreportcard.com/report/github.com/go-playground/universal-translator)
66
[![GoDoc](https://godoc.org/github.com/go-playground/universal-translator?status.svg)](https://godoc.org/github.com/go-playground/universal-translator)
@@ -45,9 +45,9 @@ Please see https://godoc.org/github.com/go-playground/universal-translator for u
4545

4646
##### Examples:
4747

48-
- [Basic](https://github.com/go-playground/universal-translator/tree/master/examples/basic)
49-
- [Full - no files](https://github.com/go-playground/universal-translator/tree/master/examples/full-no-files)
50-
- [Full - with files](https://github.com/go-playground/universal-translator/tree/master/examples/full-with-files)
48+
- [Basic](https://github.com/go-playground/universal-translator/tree/master/_examples/basic)
49+
- [Full - no files](https://github.com/go-playground/universal-translator/tree/master/_examples/full-no-files)
50+
- [Full - with files](https://github.com/go-playground/universal-translator/tree/master/_examples/full-with-files)
5151

5252
File formatting
5353
--------------
@@ -56,10 +56,10 @@ they are only separated for easy viewing.
5656

5757
##### Examples:
5858

59-
- [Formats](https://github.com/go-playground/universal-translator/tree/master/examples/file-formats)
59+
- [Formats](https://github.com/go-playground/universal-translator/tree/master/_examples/file-formats)
6060

6161
##### Basic Makeup
62-
NOTE: not all fields are needed for all translation types, see [examples](https://github.com/go-playground/universal-translator/tree/master/examples/file-formats)
62+
NOTE: not all fields are needed for all translation types, see [examples](https://github.com/go-playground/universal-translator/tree/master/_examples/file-formats)
6363
```json
6464
{
6565
"locale": "en",
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/full-no-files/main.go renamed to _examples/full-no-files/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"github.com/go-playground/locales/currency"
1212
"github.com/go-playground/locales/en"
1313
"github.com/go-playground/locales/fr"
14-
"github.com/go-playground/pure"
15-
"github.com/go-playground/pure/examples/middleware/logging-recovery"
14+
"github.com/go-playground/pure/v5"
15+
"github.com/go-playground/pure/v5/_examples/middleware/logging-recovery"
1616
"github.com/go-playground/universal-translator"
1717
)
1818

examples/full-with-files/main.go renamed to _examples/full-with-files/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"github.com/go-playground/locales/currency"
1212
"github.com/go-playground/locales/en"
1313
"github.com/go-playground/locales/fr"
14-
"github.com/go-playground/pure"
15-
"github.com/go-playground/pure/examples/middleware/logging-recovery"
14+
"github.com/go-playground/pure/v5"
15+
"github.com/go-playground/pure/v5/_examples/middleware/logging-recovery"
1616
"github.com/go-playground/universal-translator"
1717
)
1818

go.mod

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module github.com/go-playground/universal-translator
2+
3+
go 1.13
4+
5+
require github.com/go-playground/locales v0.13.0

go.sum

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
2+
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
3+
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
4+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

import_export_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ func TestBadImport(t *testing.T) {
747747
}
748748
f.Close()
749749

750-
expected = "read testdata/bad-translation6.json: bad file descriptor"
750+
expected = "read testdata/bad-translation6.json: file already closed"
751751
err = uni.ImportByReader(FormatJSON, f)
752752
if err == nil || err.Error() != expected {
753753
t.Fatalf("Expected '%s' Got '%s'", expected, err)

0 commit comments

Comments
 (0)