Skip to content

Commit

Permalink
Merge pull request #22 from go-playground/upgrade-to-go-modules
Browse files Browse the repository at this point in the history
covert to Go Modules
  • Loading branch information
deankarn committed Nov 11, 2019
2 parents 7120149 + 8a2a572 commit f87b140
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ _testmain.go

*.exe
*.test
*.prof
*.prof
*.coverprofile
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: go
go:
- 1.13.4
- tip
matrix:
allow_failures:
- go: tip

notifications:
email:
recipients: dean.karn@gmail.com
on_success: change
on_failure: always

before_install:
- go install github.com/mattn/goveralls

# Only clone the most recent commit.
git:
depth: 1

script:
- go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./...

after_success: |
[ $TRAVIS_GO_VERSION = 1.13.4 ] &&
goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## universal-translator
<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)
[![Build Status](https://semaphoreci.com/api/v1/joeybloggs/universal-translator/branches/master/badge.svg)](https://semaphoreci.com/joeybloggs/universal-translator)
<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)
[![Build Status](https://travis-ci.org/go-playground/universal-translator.svg?branch=master)](https://travis-ci.org/go-playground/universal-translator)
[![Coverage Status](https://coveralls.io/repos/github/go-playground/universal-translator/badge.svg)](https://coveralls.io/github/go-playground/universal-translator)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/universal-translator)](https://goreportcard.com/report/github.com/go-playground/universal-translator)
[![GoDoc](https://godoc.org/github.com/go-playground/universal-translator?status.svg)](https://godoc.org/github.com/go-playground/universal-translator)
Expand Down Expand Up @@ -45,9 +45,9 @@ Please see https://godoc.org/github.com/go-playground/universal-translator for u

##### Examples:

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

File formatting
--------------
Expand All @@ -56,10 +56,10 @@ they are only separated for easy viewing.

##### Examples:

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

##### Basic Makeup
NOTE: not all fields are needed for all translation types, see [examples](https://github.com/go-playground/universal-translator/tree/master/examples/file-formats)
NOTE: not all fields are needed for all translation types, see [examples](https://github.com/go-playground/universal-translator/tree/master/_examples/file-formats)
```json
{
"locale": "en",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/go-playground/locales/currency"
"github.com/go-playground/locales/en"
"github.com/go-playground/locales/fr"
"github.com/go-playground/pure"
"github.com/go-playground/pure/examples/middleware/logging-recovery"
"github.com/go-playground/pure/v5"
"github.com/go-playground/pure/v5/_examples/middleware/logging-recovery"
"github.com/go-playground/universal-translator"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/go-playground/locales/currency"
"github.com/go-playground/locales/en"
"github.com/go-playground/locales/fr"
"github.com/go-playground/pure"
"github.com/go-playground/pure/examples/middleware/logging-recovery"
"github.com/go-playground/pure/v5"
"github.com/go-playground/pure/v5/_examples/middleware/logging-recovery"
"github.com/go-playground/universal-translator"
)

Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/go-playground/universal-translator

go 1.13

require github.com/go-playground/locales v0.13.0
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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 changes: 1 addition & 1 deletion import_export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ func TestBadImport(t *testing.T) {
}
f.Close()

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

0 comments on commit f87b140

Please sign in to comment.