diff --git a/gin/b/b.go b/gin/b/b.go index d56b65d..b341c43 100644 --- a/gin/b/b.go +++ b/gin/b/b.go @@ -1,8 +1,8 @@ package b import ( - "gin-valid/gin/binding" - "gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/gin/binding" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" "mime" "net/http" ) diff --git a/gin/binding/binding.go b/gin/binding/binding.go index 5756284..a87feb3 100644 --- a/gin/binding/binding.go +++ b/gin/binding/binding.go @@ -48,7 +48,7 @@ type BindingUri interface { // StructValidator is the minimal interface which needs to be implemented in // order for it to be used as the validator engine for ensuring the correctness // of the request. Gin provides a default implementation for this using -// https://github.com/go-playground/validator/tree/v8.18.2. +// https://git.ningdatech.com/ningda/gin_valid/go-playground/validator/tree/v8.18.2. type StructValidator interface { // ValidateStruct can receive any kind of type and it should never panic, even if the configuration is not right. // If the received type is not a struct, any validation should be skipped and nil must be returned. @@ -63,7 +63,7 @@ type StructValidator interface { } // Validator is the default validator which implements the StructValidator -// interface. It uses https://github.com/go-playground/validator/tree/v8.18.2 +// interface. It uses https://git.ningdatech.com/ningda/gin_valid/go-playground/validator/tree/v8.18.2 // under the hood. var Validator StructValidator = &defaultValidator{} diff --git a/gin/binding/binding_nomsgpack.go b/gin/binding/binding_nomsgpack.go index fd227b1..7e1b58d 100644 --- a/gin/binding/binding_nomsgpack.go +++ b/gin/binding/binding_nomsgpack.go @@ -46,7 +46,7 @@ type BindingUri interface { // StructValidator is the minimal interface which needs to be implemented in // order for it to be used as the validator engine for ensuring the correctness // of the request. Gin provides a default implementation for this using -// https://github.com/go-playground/validator/tree/v8.18.2. +// https://git.ningdatech.com/ningda/gin_valid/go-playground/validator/tree/v8.18.2. type StructValidator interface { // ValidateStruct can receive any kind of type and it should never panic, even if the configuration is not right. // If the received type is not a struct, any validation should be skipped and nil must be returned. @@ -61,7 +61,7 @@ type StructValidator interface { } // Validator is the default validator which implements the StructValidator -// interface. It uses https://github.com/go-playground/validator/tree/v8.18.2 +// interface. It uses https://git.ningdatech.com/ningda/gin_valid/go-playground/validator/tree/v8.18.2 // under the hood. var Validator StructValidator = &defaultValidator{} diff --git a/gin/binding/default_validator.go b/gin/binding/default_validator.go index 684e029..86c79c8 100644 --- a/gin/binding/default_validator.go +++ b/gin/binding/default_validator.go @@ -5,15 +5,14 @@ package binding import ( - "gin-valid/go-playground/validator/v10" - ut "github.com/go-playground/universal-translator" - zhTrans "go-playground/validator/v10/translations/zh" - "go-playground/locales/zh" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales/zh" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + zhTrans "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10/translations/zh" "reflect" "strings" "sync" - "go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) type defaultValidator struct { diff --git a/gin/binding/form_mapping.go b/gin/binding/form_mapping.go index a2d3b3d..b6d15e0 100644 --- a/gin/binding/form_mapping.go +++ b/gin/binding/form_mapping.go @@ -12,8 +12,8 @@ import ( "strings" "time" - "gin-valid/gin/internal/bytesconv" - "gin-valid/gin/internal/json" + "git.ningdatech.com/ningda/gin_valid/gin/internal/bytesconv" + "git.ningdatech.com/ningda/gin_valid/gin/internal/json" ) var errUnknownType = errors.New("unknown type") diff --git a/gin/binding/json.go b/gin/binding/json.go index 26d390f..80b4bce 100644 --- a/gin/binding/json.go +++ b/gin/binding/json.go @@ -10,7 +10,7 @@ import ( "io" "net/http" - "gin-valid/gin/internal/json" + "git.ningdatech.com/ningda/gin_valid/gin/internal/json" ) // EnableDecoderUseNumber is used to call the UseNumber method on the JSON diff --git a/gin/binding/json_test.go b/gin/binding/json_test.go index 0f61a20..fbd5c52 100644 --- a/gin/binding/json_test.go +++ b/gin/binding/json_test.go @@ -1,4 +1,4 @@ -/ Copyright 2019 Gin Core Team. All rights reserved. +// Copyright 2019 Gin Core Team. All rights reserved. // Use of this source code is governed by a MIT style // license that can be found in the LICENSE file. diff --git a/gin/binding/validate_test.go b/gin/binding/validate_test.go index 18bc8ec..3529100 100644 --- a/gin/binding/validate_test.go +++ b/gin/binding/validate_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" "github.com/stretchr/testify/assert" ) diff --git a/go-playground/locales/README.md b/go-playground/locales/README.md index db4c4d0..ba1b068 100644 --- a/go-playground/locales/README.md +++ b/go-playground/locales/README.md @@ -1,8 +1,8 @@ ## locales ![Project status](https://img.shields.io/badge/version-0.13.0-green.svg) [![Build Status](https://travis-ci.org/go-playground/locales.svg?branch=master)](https://travis-ci.org/go-playground/locales) -[![Go Report Card](https://goreportcard.com/badge/go-playground/locales)](https://goreportcard.com/report/go-playground/locales) -[![GoDoc](https://godoc.org/go-playground/locales?status.svg)](https://godoc.org/go-playground/locales) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/locales)](https://goreportcard.com/report/github.com/go-playground/locales) +[![GoDoc](https://godoc.org/github.com/go-playground/locales?status.svg)](https://godoc.org/github.com/go-playground/locales) ![License](https://img.shields.io/dub/l/vibe-d.svg) [![Gitter](https://badges.gitter.im/go-playground/locales.svg)](https://gitter.im/go-playground/locales?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) @@ -21,7 +21,7 @@ Features Full Tests -------------------- I could sure use your help adding tests for every locale, it is a huge undertaking and I just don't have the free time to do it all at the moment; -any help would be **greatly appreciated!!!!** please see [issue](https://go-playground/locales/issues/1) for details. +any help would be **greatly appreciated!!!!** please see [issue](https://github.com/go-playground/locales/issues/1) for details. Installation ----------- @@ -29,7 +29,7 @@ Installation Use go get ```shell -go get go-playground/locales +go get github.com/go-playground/locales ``` NOTES @@ -46,8 +46,8 @@ import ( "fmt" "time" - "go-playground/locales/currency" - "go-playground/locales/en_CA" + "github.com/go-playground/locales/currency" + "github.com/go-playground/locales/en_CA" ) func main() { diff --git a/go-playground/locales/go.mod b/go-playground/locales/go.mod new file mode 100644 index 0000000..5d7155b --- /dev/null +++ b/go-playground/locales/go.mod @@ -0,0 +1,5 @@ +module git.ningdatech.com/ningda/gin_valid/go-playground/locales + +go 1.13 + + diff --git a/go-playground/locales/rules.go b/go-playground/locales/rules.go index 26f1c08..6fd1b93 100644 --- a/go-playground/locales/rules.go +++ b/go-playground/locales/rules.go @@ -4,7 +4,7 @@ import ( "strconv" "time" - "go-playground/locales/currency" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales/currency" ) // // ErrBadNumberValue is returned when the number passed for diff --git a/go-playground/locales/zh/zh.go b/go-playground/locales/zh/zh.go index 726938a..9672a78 100644 --- a/go-playground/locales/zh/zh.go +++ b/go-playground/locales/zh/zh.go @@ -5,8 +5,8 @@ import ( "strconv" "time" - "go-playground/locales" - "go-playground/locales/currency" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales/currency" ) type zh struct { diff --git a/go-playground/universal-translator/README.md b/go-playground/universal-translator/README.md index 42f5f94..071f33a 100644 --- a/go-playground/universal-translator/README.md +++ b/go-playground/universal-translator/README.md @@ -12,8 +12,8 @@ Universal Translator is an i18n Translator for Go/Golang using CLDR data + plura Why another i18n library? -------------------------- Because none of the plural rules seem to be correct out there, including the previous implementation of this package, -so I took it upon myself to create [locales](https://go-playground/locales) for everyone to use; this package -is a thin wrapper around [locales](https://go-playground/locales) in order to store and translate text for +so I took it upon myself to create [locales](https://github.com/go-playground/locales) for everyone to use; this package +is a thin wrapper around [locales](https://github.com/go-playground/locales) in order to store and translate text for use in your applications. Features @@ -27,7 +27,7 @@ Features - [x] Support loading translations from files - [x] Exporting translations to file(s), mainly for getting them professionally translated - [ ] Code Generation for translation files -> Go code.. i.e. after it has been professionally translated -- [ ] Tests for all languages, I need help with this, please see [here](https://go-playground/locales/issues/1) +- [ ] Tests for all languages, I need help with this, please see [here](https://github.com/go-playground/locales/issues/1) Installation ----------- @@ -82,7 +82,7 @@ NOTE: not all fields are needed for all translation types, see [examples](https: Help With Tests --------------- To anyone interesting in helping or contributing, I sure could use some help creating tests for each language. -Please see issue [here](https://go-playground/locales/issues/1) for details. +Please see issue [here](https://github.com/go-playground/locales/issues/1) for details. License ------ diff --git a/go-playground/universal-translator/errors.go b/go-playground/universal-translator/errors.go index 3b4649c..af6510e 100644 --- a/go-playground/universal-translator/errors.go +++ b/go-playground/universal-translator/errors.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "gin-valid/go-playground/locales" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" ) var ( diff --git a/go-playground/universal-translator/go.mod b/go-playground/universal-translator/go.mod new file mode 100644 index 0000000..e219c88 --- /dev/null +++ b/go-playground/universal-translator/go.mod @@ -0,0 +1,5 @@ +module git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator + +go 1.13 + +require git.ningdatech.com/ningda/gin_valid v0.0.0-20201127152634-63bddbcc4667 // indirect diff --git a/go-playground/universal-translator/go.sum b/go-playground/universal-translator/go.sum index 54b4c8a..3cb4bd7 100644 --- a/go-playground/universal-translator/go.sum +++ b/go-playground/universal-translator/go.sum @@ -1,4 +1,49 @@ -go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= -go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +git.ningdatech.com/ningda/gin_valid v0.0.0-20201127152634-63bddbcc4667 h1:Twp9fEdYNlRYDmPqwGM5FcY4r7hZpMzI6/SFoYdkAjs= +git.ningdatech.com/ningda/gin_valid v0.0.0-20201127152634-63bddbcc4667/go.mod h1:QwiarqFkyNmqYlSsUP2RrqsDtSuDncK1KGCvjgh+blQ= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +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= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/ugorji/go v1.2.0/go.mod h1:1ny++pKMXhLWrwWV5Nf+CbOuZJhMoaFD+0GMFfd8fEc= +github.com/ugorji/go/codec v1.2.0/go.mod h1:dXvG35r7zTX6QImXOSFhGMmKtX+wJ7VTWzGvYQGIjBs= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go-playground/universal-translator/import_export.go b/go-playground/universal-translator/import_export.go index 839d012..7bd76f2 100644 --- a/go-playground/universal-translator/import_export.go +++ b/go-playground/universal-translator/import_export.go @@ -9,7 +9,7 @@ import ( "io" - "go-playground/locales" + "github.com/go-playground/locales" ) type translation struct { diff --git a/go-playground/universal-translator/translator.go b/go-playground/universal-translator/translator.go index a63ec1f..37316f4 100644 --- a/go-playground/universal-translator/translator.go +++ b/go-playground/universal-translator/translator.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "gin-valid/go-playground/locales" + "github.com/go-playground/locales" ) const ( diff --git a/go-playground/universal-translator/universal_translator.go b/go-playground/universal-translator/universal_translator.go index 32c619e..dbf707f 100644 --- a/go-playground/universal-translator/universal_translator.go +++ b/go-playground/universal-translator/universal_translator.go @@ -3,7 +3,7 @@ package ut import ( "strings" - "go-playground/locales" + "github.com/go-playground/locales" ) // UniversalTranslator holds all locale & translation data diff --git a/go-playground/validator/v10/README.md b/go-playground/validator/v10/README.md index de72348..04fbb3c 100644 --- a/go-playground/validator/v10/README.md +++ b/go-playground/validator/v10/README.md @@ -5,7 +5,7 @@ Package validator [![Build Status](https://travis-ci.org/go-playground/validator.svg?branch=master)](https://travis-ci.org/go-playground/validator) [![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=master&service=github)](https://coveralls.io/github/go-playground/validator?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator) -[![GoDoc](https://godoc.org/github.com/go-playground/validator?status.svg)](https://pkg.go.dev/gin-valid/go-playground/validator/v10) +[![GoDoc](https://godoc.org/github.com/go-playground/validator?status.svg)](https://pkg.go.dev/github.com/go-playground/validator/v10) ![License](https://img.shields.io/dub/l/vibe-d.svg) Package validator implements value validations for structs and individual fields based on tags. @@ -27,11 +27,11 @@ Installation Use go get. - go get gin-valid/go-playground/validator/v10 + go get github.com/go-playground/validator/v10 Then import the validator package into your own code. - import "gin-valid/go-playground/validator/v10" + import "github.com/go-playground/validator/v10" Error Return Value ------- diff --git a/go-playground/validator/v10/_examples/custom-validation/main.go b/go-playground/validator/v10/_examples/custom-validation/main.go index db8822e..6ba8ef2 100644 --- a/go-playground/validator/v10/_examples/custom-validation/main.go +++ b/go-playground/validator/v10/_examples/custom-validation/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/validator/v10" ) // MyStruct .. diff --git a/go-playground/validator/v10/_examples/custom/main.go b/go-playground/validator/v10/_examples/custom/main.go index ebaa6b8..f44ef4c 100644 --- a/go-playground/validator/v10/_examples/custom/main.go +++ b/go-playground/validator/v10/_examples/custom/main.go @@ -6,7 +6,7 @@ import ( "fmt" "reflect" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/validator/v10" ) // DbBackedUser User struct diff --git a/go-playground/validator/v10/_examples/dive/main.go b/go-playground/validator/v10/_examples/dive/main.go index f67592e..18b9e7f 100644 --- a/go-playground/validator/v10/_examples/dive/main.go +++ b/go-playground/validator/v10/_examples/dive/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/validator/v10" ) // Test ... diff --git a/go-playground/validator/v10/_examples/gin-upgrading-overriding/main.go b/go-playground/validator/v10/_examples/gin-upgrading-overriding/main.go index 99a1ddf..46fdf2a 100644 --- a/go-playground/validator/v10/_examples/gin-upgrading-overriding/main.go +++ b/go-playground/validator/v10/_examples/gin-upgrading-overriding/main.go @@ -1,6 +1,6 @@ package main -import "gin-valid/gin/binding" +import "github.com/gin-gonic/gin/binding" func main() { diff --git a/go-playground/validator/v10/_examples/gin-upgrading-overriding/v8_to_v9.go b/go-playground/validator/v10/_examples/gin-upgrading-overriding/v8_to_v9.go index c049989..8c310a7 100644 --- a/go-playground/validator/v10/_examples/gin-upgrading-overriding/v8_to_v9.go +++ b/go-playground/validator/v10/_examples/gin-upgrading-overriding/v8_to_v9.go @@ -4,8 +4,8 @@ import ( "reflect" "sync" - "gin-valid/gin/binding" - "gin-valid/go-playground/validator/v10" + "github.com/gin-gonic/gin/binding" + "github.com/go-playground/validator/v10" ) type defaultValidator struct { diff --git a/go-playground/validator/v10/_examples/simple/main.go b/go-playground/validator/v10/_examples/simple/main.go index 02242d8..0d3ca51 100644 --- a/go-playground/validator/v10/_examples/simple/main.go +++ b/go-playground/validator/v10/_examples/simple/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/validator/v10" ) // User contains user information diff --git a/go-playground/validator/v10/_examples/struct-level/main.go b/go-playground/validator/v10/_examples/struct-level/main.go index 4472623..3231a81 100644 --- a/go-playground/validator/v10/_examples/struct-level/main.go +++ b/go-playground/validator/v10/_examples/struct-level/main.go @@ -5,7 +5,7 @@ import ( "reflect" "strings" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/validator/v10" ) // User contains user information diff --git a/go-playground/validator/v10/_examples/translations/main.go b/go-playground/validator/v10/_examples/translations/main.go index 61d4f02..6f9466d 100644 --- a/go-playground/validator/v10/_examples/translations/main.go +++ b/go-playground/validator/v10/_examples/translations/main.go @@ -3,10 +3,10 @@ package main import ( "fmt" - "gin-valid/go-playground/locales/en" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" - en_translations "gin-valid/go-playground/validator/v10/translations/en" + "github.com/go-playground/locales/en" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" + en_translations "github.com/go-playground/validator/v10/translations/en" ) // User contains user information diff --git a/go-playground/validator/v10/errors.go b/go-playground/validator/v10/errors.go index 776029c..6038f34 100644 --- a/go-playground/validator/v10/errors.go +++ b/go-playground/validator/v10/errors.go @@ -6,7 +6,7 @@ import ( "reflect" "strings" - ut "gin-valid/go-playground/universal-translator" + ut "github.com/go-playground/universal-translator" ) const ( diff --git a/go-playground/validator/v10/go.mod b/go-playground/validator/v10/go.mod new file mode 100644 index 0000000..026dacc --- /dev/null +++ b/go-playground/validator/v10/go.mod @@ -0,0 +1,10 @@ +module git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10 + +go 1.13 + +require ( + git.ningdatech.com/ningda/gin_valid v0.0.0-20201127152634-63bddbcc4667 // indirect + github.com/gin-gonic/gin v1.6.3 // indirect + github.com/go-playground/validator/v10 v10.4.1 // indirect + github.com/leodido/go-urn v1.2.0 // indirect +) diff --git a/go-playground/validator/v10/go.sum b/go-playground/validator/v10/go.sum index 3dc4e15..933a73b 100644 --- a/go-playground/validator/v10/go.sum +++ b/go-playground/validator/v10/go.sum @@ -1,20 +1,37 @@ +git.ningdatech.com/ningda/gin_valid v0.0.0-20201127152634-63bddbcc4667 h1:Twp9fEdYNlRYDmPqwGM5FcY4r7hZpMzI6/SFoYdkAjs= +git.ningdatech.com/ningda/gin_valid v0.0.0-20201127152634-63bddbcc4667/go.mod h1:QwiarqFkyNmqYlSsUP2RrqsDtSuDncK1KGCvjgh+blQ= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/go-playground/assert v1.2.1 h1:ad06XqC+TOv0nJWnbULSlh3ehp5uLuQEojZY5Tq8RgI= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -gin-valid/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= -gin-valid/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -gin-valid/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= -gin-valid/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -gin-valid/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +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= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator v9.31.0+incompatible h1:UA72EPEogEnq76ehGdEDp4Mit+3FDh548oRqwVgNsHA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -26,23 +43,44 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go v1.2.0 h1:6eXlzYLLwZwXroJx9NyqbYcbv/d93twiOzQLDewE6qM= +github.com/ugorji/go v1.2.0/go.mod h1:1ny++pKMXhLWrwWV5Nf+CbOuZJhMoaFD+0GMFfd8fEc= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.0 h1:As6RccOIlbm9wHuWYMlB30dErcI+4WiKWsYsmPkyrUw= +github.com/ugorji/go/codec v1.2.0/go.mod h1:dXvG35r7zTX6QImXOSFhGMmKtX+wJ7VTWzGvYQGIjBs= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 h1:xYJJ3S178yv++9zXV/hnr29plCAGO9vAFG9dorqaFQc= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go-playground/validator/v10/non-standard/validators/notblank.go b/go-playground/validator/v10/non-standard/validators/notblank.go index 9aa4c96..80c815f 100644 --- a/go-playground/validator/v10/non-standard/validators/notblank.go +++ b/go-playground/validator/v10/non-standard/validators/notblank.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/validator/v10" ) // NotBlank is the validation function for validating if the current field diff --git a/go-playground/validator/v10/non-standard/validators/notblank_test.go b/go-playground/validator/v10/non-standard/validators/notblank_test.go index 5ef53dd..cc9d0c1 100644 --- a/go-playground/validator/v10/non-standard/validators/notblank_test.go +++ b/go-playground/validator/v10/non-standard/validators/notblank_test.go @@ -3,8 +3,8 @@ package validators import ( "testing" - "gin-valid/go-playground/validator/v10" "github.com/go-playground/assert/v2" + "github.com/go-playground/validator/v10" ) type test struct { diff --git a/go-playground/validator/v10/translations.go b/go-playground/validator/v10/translations.go index 1ea55ac..ea58a85 100644 --- a/go-playground/validator/v10/translations.go +++ b/go-playground/validator/v10/translations.go @@ -1,6 +1,6 @@ package validator -import ut "gin-valid/go-playground/universal-translator" +import ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" // TranslationFunc is the function type used to register or override // custom translations diff --git a/go-playground/validator/v10/translations/en/en.go b/go-playground/validator/v10/translations/en/en.go index c56466b..5a2c845 100644 --- a/go-playground/validator/v10/translations/en/en.go +++ b/go-playground/validator/v10/translations/en/en.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/en/en_test.go b/go-playground/validator/v10/translations/en/en_test.go index 9b6be95..2b113c6 100644 --- a/go-playground/validator/v10/translations/en/en_test.go +++ b/go-playground/validator/v10/translations/en/en_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - english "gin-valid/go-playground/locales/en" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + english "github.com/go-playground/locales/en" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/es/es.go b/go-playground/validator/v10/translations/es/es.go index 7722aac..2b87f10 100644 --- a/go-playground/validator/v10/translations/es/es.go +++ b/go-playground/validator/v10/translations/es/es.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/es/es_test.go b/go-playground/validator/v10/translations/es/es_test.go index 5985c38..e3e9055 100644 --- a/go-playground/validator/v10/translations/es/es_test.go +++ b/go-playground/validator/v10/translations/es/es_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - spanish "gin-valid/go-playground/locales/es" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + spanish "github.com/go-playground/locales/es" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/fr/fr.go b/go-playground/validator/v10/translations/fr/fr.go index 82dbacf..ddebdf9 100644 --- a/go-playground/validator/v10/translations/fr/fr.go +++ b/go-playground/validator/v10/translations/fr/fr.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/fr/fr_test.go b/go-playground/validator/v10/translations/fr/fr_test.go index 08c8a63..0006c8d 100644 --- a/go-playground/validator/v10/translations/fr/fr_test.go +++ b/go-playground/validator/v10/translations/fr/fr_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - french "gin-valid/go-playground/locales/fr" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + french "github.com/go-playground/locales/fr" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/id/id.go b/go-playground/validator/v10/translations/id/id.go index e98b61b..d185dfc 100644 --- a/go-playground/validator/v10/translations/id/id.go +++ b/go-playground/validator/v10/translations/id/id.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/id/id_test.go b/go-playground/validator/v10/translations/id/id_test.go index 1305ff6..aa4f5c7 100644 --- a/go-playground/validator/v10/translations/id/id_test.go +++ b/go-playground/validator/v10/translations/id/id_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - indonesia "gin-valid/go-playground/locales/id" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + indonesia "github.com/go-playground/locales/id" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/ja/ja.go b/go-playground/validator/v10/translations/ja/ja.go index 2de8803..43ec648 100644 --- a/go-playground/validator/v10/translations/ja/ja.go +++ b/go-playground/validator/v10/translations/ja/ja.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/ja/ja_test.go b/go-playground/validator/v10/translations/ja/ja_test.go index d47fe34..435018b 100644 --- a/go-playground/validator/v10/translations/ja/ja_test.go +++ b/go-playground/validator/v10/translations/ja/ja_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - ja_locale "gin-valid/go-playground/locales/ja" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + ja_locale "github.com/go-playground/locales/ja" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/nl/nl.go b/go-playground/validator/v10/translations/nl/nl.go index bb9c544..a64815d 100644 --- a/go-playground/validator/v10/translations/nl/nl.go +++ b/go-playground/validator/v10/translations/nl/nl.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/nl/nl_test.go b/go-playground/validator/v10/translations/nl/nl_test.go index 4ec720e..f46974c 100644 --- a/go-playground/validator/v10/translations/nl/nl_test.go +++ b/go-playground/validator/v10/translations/nl/nl_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - english "gin-valid/go-playground/locales/en" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + english "github.com/go-playground/locales/en" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/pt/pt.go b/go-playground/validator/v10/translations/pt/pt.go index e3d24a9..9dbaf5f 100644 --- a/go-playground/validator/v10/translations/pt/pt.go +++ b/go-playground/validator/v10/translations/pt/pt.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/pt/pt_test.go b/go-playground/validator/v10/translations/pt/pt_test.go index f8a9c7e..ceec15f 100644 --- a/go-playground/validator/v10/translations/pt/pt_test.go +++ b/go-playground/validator/v10/translations/pt/pt_test.go @@ -4,11 +4,11 @@ import ( "testing" "time" - "gin-valid/go-playground/locales/pt" - ut "gin-valid/go-playground/universal-translator" . "github.com/go-playground/assert/v2" + "github.com/go-playground/locales/pt" + ut "github.com/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/pt_BR/pt_BR.go b/go-playground/validator/v10/translations/pt_BR/pt_BR.go index eb06572..df4fc67 100644 --- a/go-playground/validator/v10/translations/pt_BR/pt_BR.go +++ b/go-playground/validator/v10/translations/pt_BR/pt_BR.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/pt_BR/pt_BR_test.go b/go-playground/validator/v10/translations/pt_BR/pt_BR_test.go index 8877e95..6f80ef7 100644 --- a/go-playground/validator/v10/translations/pt_BR/pt_BR_test.go +++ b/go-playground/validator/v10/translations/pt_BR/pt_BR_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - brazilian_portuguese "gin-valid/go-playground/locales/pt_BR" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + brazilian_portuguese "github.com/go-playground/locales/pt_BR" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/ru/ru.go b/go-playground/validator/v10/translations/ru/ru.go index 53a335a..6f9d41b 100644 --- a/go-playground/validator/v10/translations/ru/ru.go +++ b/go-playground/validator/v10/translations/ru/ru.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/ru/ru_test.go b/go-playground/validator/v10/translations/ru/ru_test.go index 493c1f4..aa5beb7 100644 --- a/go-playground/validator/v10/translations/ru/ru_test.go +++ b/go-playground/validator/v10/translations/ru/ru_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - russian "gin-valid/go-playground/locales/en" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + russian "github.com/go-playground/locales/en" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/tr/tr.go b/go-playground/validator/v10/translations/tr/tr.go index 72706ed..2709e4b 100644 --- a/go-playground/validator/v10/translations/tr/tr.go +++ b/go-playground/validator/v10/translations/tr/tr.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/tr/tr_test.go b/go-playground/validator/v10/translations/tr/tr_test.go index 07ee1f7..0b15b49 100644 --- a/go-playground/validator/v10/translations/tr/tr_test.go +++ b/go-playground/validator/v10/translations/tr/tr_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - turkish "gin-valid/go-playground/locales/tr" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + turkish "github.com/go-playground/locales/tr" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/zh/zh.go b/go-playground/validator/v10/translations/zh/zh.go index f681812..98cf889 100644 --- a/go-playground/validator/v10/translations/zh/zh.go +++ b/go-playground/validator/v10/translations/zh/zh.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/zh/zh_test.go b/go-playground/validator/v10/translations/zh/zh_test.go index af7ca7a..d106e0d 100644 --- a/go-playground/validator/v10/translations/zh/zh_test.go +++ b/go-playground/validator/v10/translations/zh/zh_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - zhongwen "gin-valid/go-playground/locales/zh" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + zhongwen "github.com/go-playground/locales/zh" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/translations/zh_tw/zh_tw.go b/go-playground/validator/v10/translations/zh_tw/zh_tw.go index 1e49efb..391a010 100644 --- a/go-playground/validator/v10/translations/zh_tw/zh_tw.go +++ b/go-playground/validator/v10/translations/zh_tw/zh_tw.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "gin-valid/go-playground/locales" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" + "github.com/go-playground/locales" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/zh_tw/zh_tw_test.go b/go-playground/validator/v10/translations/zh_tw/zh_tw_test.go index b011ae7..cf60d1d 100644 --- a/go-playground/validator/v10/translations/zh_tw/zh_tw_test.go +++ b/go-playground/validator/v10/translations/zh_tw/zh_tw_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - zhongwen "gin-valid/go-playground/locales/zh_Hant_TW" - ut "gin-valid/go-playground/universal-translator" - "gin-valid/go-playground/validator/v10" . "github.com/go-playground/assert/v2" + zhongwen "github.com/go-playground/locales/zh_Hant_TW" + ut "github.com/go-playground/universal-translator" + "github.com/go-playground/validator/v10" ) func TestTranslations(t *testing.T) { diff --git a/go-playground/validator/v10/validator_instance.go b/go-playground/validator/v10/validator_instance.go index 1855290..7b63b19 100644 --- a/go-playground/validator/v10/validator_instance.go +++ b/go-playground/validator/v10/validator_instance.go @@ -9,7 +9,7 @@ import ( "sync" "time" - ut "gin-valid/go-playground/universal-translator" + ut "github.com/go-playground/universal-translator" ) const ( diff --git a/go-playground/validator/v10/validator_test.go b/go-playground/validator/v10/validator_test.go index 6b1f392..6c9fb1e 100644 --- a/go-playground/validator/v10/validator_test.go +++ b/go-playground/validator/v10/validator_test.go @@ -14,11 +14,11 @@ import ( "testing" "time" - "gin-valid/go-playground/locales/en" - "gin-valid/go-playground/locales/fr" - "gin-valid/go-playground/locales/nl" - ut "gin-valid/go-playground/universal-translator" . "github.com/go-playground/assert/v2" + "github.com/go-playground/locales/en" + "github.com/go-playground/locales/fr" + "github.com/go-playground/locales/nl" + ut "github.com/go-playground/universal-translator" ) // NOTES: diff --git a/go.mod b/go.mod index 17bb981..ac584b6 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,11 @@ -module git.ningdatech.com/ningda/gin_valid +module git.ningdatech.com/ningda/gin_valid go 1.13 require ( - github.com/go-playground/assert/v2 v2.0.1 // indirect - github.com/go-playground/universal-translator v0.17.0 github.com/golang/protobuf v1.4.3 - github.com/json-iterator/go v1.1.10 - github.com/leodido/go-urn v1.2.0 - github.com/stretchr/testify v1.6.1 + github.com/json-iterator/go v1.1.10 // indirect + github.com/ugorji/go v1.2.0 // indirect github.com/ugorji/go/codec v1.2.0 - golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 gopkg.in/yaml.v2 v2.4.0 )