Fix universal translator imports so that goimports doesn't get remove them

Running goimports on the codebase deletes all the imports of "github.com/go-playground/universal-translator".

The fix consists of explicitly qualifying the import statements with ut.
pull/256/head
Jawher Moussa 8 years ago
parent 23e84d2f88
commit 73e8e76de2
  1. 2
      errors.go
  2. 2
      examples/translations/main.go
  3. 2
      translations.go
  4. 2
      translations/en/en.go
  5. 2
      translations/en/en_test.go
  6. 2
      validator_instance.go
  7. 2
      validator_test.go

@ -6,7 +6,7 @@ import (
"reflect"
"strings"
"github.com/go-playground/universal-translator"
ut "github.com/go-playground/universal-translator"
)
const (

@ -4,7 +4,7 @@ import (
"fmt"
"github.com/go-playground/locales/en"
"github.com/go-playground/universal-translator"
ut "github.com/go-playground/universal-translator"
"gopkg.in/go-playground/validator.v9"
en_translations "gopkg.in/go-playground/validator.v9/translations/en"
)

@ -1,6 +1,6 @@
package validator
import "github.com/go-playground/universal-translator"
import ut "github.com/go-playground/universal-translator"
// TranslationFunc is the function type used to register or override
// custom translations

@ -9,7 +9,7 @@ import (
"time"
"github.com/go-playground/locales"
"github.com/go-playground/universal-translator"
ut "github.com/go-playground/universal-translator"
"gopkg.in/go-playground/validator.v9"
)

@ -5,7 +5,7 @@ import (
"time"
english "github.com/go-playground/locales/en"
"github.com/go-playground/universal-translator"
ut "github.com/go-playground/universal-translator"
. "gopkg.in/go-playground/assert.v1"
"gopkg.in/go-playground/validator.v9"
)

@ -8,7 +8,7 @@ import (
"sync"
"time"
"github.com/go-playground/universal-translator"
ut "github.com/go-playground/universal-translator"
)
const (

@ -15,7 +15,7 @@ import (
"github.com/go-playground/locales/en"
"github.com/go-playground/locales/fr"
"github.com/go-playground/locales/nl"
"github.com/go-playground/universal-translator"
ut "github.com/go-playground/universal-translator"
)
// NOTES:

Loading…
Cancel
Save