From 22ec4deb4aa929256d3749050761323a06f9f711 Mon Sep 17 00:00:00 2001 From: gamife Date: Sat, 5 Dec 2020 15:37:56 +0800 Subject: [PATCH] =?UTF-8?q?gin-valid=20=E6=94=B9=E4=B8=BA=E4=B8=8B?= =?UTF-8?q?=E5=88=92=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gin/b/b.go | 4 ++-- gin/binding/default_validator.go | 8 ++++---- gin/binding/form_mapping.go | 4 ++-- gin/binding/json.go | 2 +- go-playground/locales/rules.go | 2 +- go-playground/locales/zh/zh.go | 4 ++-- go-playground/universal-translator/errors.go | 2 +- go-playground/universal-translator/import_export.go | 2 +- go-playground/universal-translator/translator.go | 2 +- go-playground/universal-translator/universal_translator.go | 2 +- go-playground/validator/v10/README.md | 6 +++--- go-playground/validator/v10/errors.go | 2 +- go-playground/validator/v10/non-standard/validators/notblank.go | 2 +- .../validator/v10/non-standard/validators/notblank_test.go | 2 +- go-playground/validator/v10/translations.go | 2 +- go-playground/validator/v10/translations/en/en.go | 6 +++--- go-playground/validator/v10/translations/es/es.go | 6 +++--- go-playground/validator/v10/translations/fr/fr.go | 6 +++--- go-playground/validator/v10/translations/id/id.go | 6 +++--- go-playground/validator/v10/translations/ja/ja.go | 6 +++--- go-playground/validator/v10/translations/nl/nl.go | 6 +++--- go-playground/validator/v10/translations/pt/pt.go | 6 +++--- go-playground/validator/v10/translations/pt_BR/pt_BR.go | 6 +++--- go-playground/validator/v10/translations/ru/ru.go | 6 +++--- go-playground/validator/v10/translations/tr/tr.go | 6 +++--- go-playground/validator/v10/translations/zh/zh.go | 6 +++--- go-playground/validator/v10/translations/zh_tw/zh_tw.go | 6 +++--- go-playground/validator/v10/validator_instance.go | 2 +- go.mod | 2 +- 29 files changed, 61 insertions(+), 61 deletions(-) diff --git a/gin/b/b.go b/gin/b/b.go index b8cd469..b341c43 100644 --- a/gin/b/b.go +++ b/gin/b/b.go @@ -1,8 +1,8 @@ package b import ( - "git.ningdatech.com/ningda/gin-valid/gin/binding" - "git.ningdatech.com/ningda/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/default_validator.go b/gin/binding/default_validator.go index e1fd930..8882e11 100644 --- a/gin/binding/default_validator.go +++ b/gin/binding/default_validator.go @@ -5,10 +5,10 @@ package binding import ( - "git.ningdatech.com/ningda/gin-valid/go-playground/locales/zh" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" - zhTrans "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10/translations/zh" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales/zh" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" + zhTrans "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10/translations/zh" "reflect" "strings" "sync" diff --git a/gin/binding/form_mapping.go b/gin/binding/form_mapping.go index a625500..b6d15e0 100644 --- a/gin/binding/form_mapping.go +++ b/gin/binding/form_mapping.go @@ -12,8 +12,8 @@ import ( "strings" "time" - "git.ningdatech.com/ningda/gin-valid/gin/internal/bytesconv" - "git.ningdatech.com/ningda/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 d4f012a..80b4bce 100644 --- a/gin/binding/json.go +++ b/gin/binding/json.go @@ -10,7 +10,7 @@ import ( "io" "net/http" - "git.ningdatech.com/ningda/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/go-playground/locales/rules.go b/go-playground/locales/rules.go index 49ff18e..6fd1b93 100644 --- a/go-playground/locales/rules.go +++ b/go-playground/locales/rules.go @@ -4,7 +4,7 @@ import ( "strconv" "time" - "git.ningdatech.com/ningda/gin-valid/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 33ef6da..9672a78 100644 --- a/go-playground/locales/zh/zh.go +++ b/go-playground/locales/zh/zh.go @@ -5,8 +5,8 @@ import ( "strconv" "time" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - "git.ningdatech.com/ningda/gin-valid/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/errors.go b/go-playground/universal-translator/errors.go index 0b52d54..af6510e 100644 --- a/go-playground/universal-translator/errors.go +++ b/go-playground/universal-translator/errors.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" ) var ( diff --git a/go-playground/universal-translator/import_export.go b/go-playground/universal-translator/import_export.go index 0ea2058..7cec0d0 100644 --- a/go-playground/universal-translator/import_export.go +++ b/go-playground/universal-translator/import_export.go @@ -9,7 +9,7 @@ import ( "io" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" ) type translation struct { diff --git a/go-playground/universal-translator/translator.go b/go-playground/universal-translator/translator.go index de9145b..1d89cf9 100644 --- a/go-playground/universal-translator/translator.go +++ b/go-playground/universal-translator/translator.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" ) const ( diff --git a/go-playground/universal-translator/universal_translator.go b/go-playground/universal-translator/universal_translator.go index 3d45669..6292194 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" + "git.ningdatech.com/ningda/gin_valid/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 e711318..5d0cb92 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/git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10) +[![GoDoc](https://godoc.org/github.com/go-playground/validator?status.svg)](https://pkg.go.dev/git.ningdatech.com/ningda/gin_valid/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 git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10 + go get git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10 Then import the validator package into your own code. - import "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + import "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" Error Return Value ------- diff --git a/go-playground/validator/v10/errors.go b/go-playground/validator/v10/errors.go index f7c5a38..7444849 100644 --- a/go-playground/validator/v10/errors.go +++ b/go-playground/validator/v10/errors.go @@ -6,7 +6,7 @@ import ( "reflect" "strings" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" ) const ( diff --git a/go-playground/validator/v10/non-standard/validators/notblank.go b/go-playground/validator/v10/non-standard/validators/notblank.go index 26a3a2a..1440a20 100644 --- a/go-playground/validator/v10/non-standard/validators/notblank.go +++ b/go-playground/validator/v10/non-standard/validators/notblank.go @@ -1,7 +1,7 @@ package validators import ( - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" "reflect" "strings" ) 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 f4f6296..4c739bb 100644 --- a/go-playground/validator/v10/non-standard/validators/notblank_test.go +++ b/go-playground/validator/v10/non-standard/validators/notblank_test.go @@ -1,7 +1,7 @@ package validators import ( - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" "github.com/go-playground/assert/v2" "testing" ) diff --git a/go-playground/validator/v10/translations.go b/go-playground/validator/v10/translations.go index d547b32..ea58a85 100644 --- a/go-playground/validator/v10/translations.go +++ b/go-playground/validator/v10/translations.go @@ -1,6 +1,6 @@ package validator -import ut "git.ningdatech.com/ningda/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 b6f9698..1ab53e1 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/es/es.go b/go-playground/validator/v10/translations/es/es.go index 7db1f14..8df35ad 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/fr/fr.go b/go-playground/validator/v10/translations/fr/fr.go index 5dd85bf..b27c588 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/id/id.go b/go-playground/validator/v10/translations/id/id.go index e8cee3c..594e8c1 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/ja/ja.go b/go-playground/validator/v10/translations/ja/ja.go index 5582522..26c9367 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/nl/nl.go b/go-playground/validator/v10/translations/nl/nl.go index 4b436e6..8f49a1d 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/pt/pt.go b/go-playground/validator/v10/translations/pt/pt.go index ccfa635..91399a7 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations 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 42b0eae..7f0e0aa 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/ru/ru.go b/go-playground/validator/v10/translations/ru/ru.go index 169f612..54ea05d 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/tr/tr.go b/go-playground/validator/v10/translations/tr/tr.go index 9c79e42..2c3d773 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/translations/zh/zh.go b/go-playground/validator/v10/translations/zh/zh.go index 0916fc2..42b52b5 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations 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 c01de25..40dd9f5 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" - "git.ningdatech.com/ningda/gin-valid/go-playground/locales" - ut "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" - "git.ningdatech.com/ningda/gin-valid/go-playground/validator/v10" + "git.ningdatech.com/ningda/gin_valid/go-playground/locales" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" + "git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10" ) // RegisterDefaultTranslations registers a set of default translations diff --git a/go-playground/validator/v10/validator_instance.go b/go-playground/validator/v10/validator_instance.go index 4cef8f7..bbe7a4f 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 "git.ningdatech.com/ningda/gin-valid/go-playground/universal-translator" + ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator" ) const ( diff --git a/go.mod b/go.mod index fa6f66e..9f8b77a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.ningdatech.com/ningda/gin-valid +module git.ningdatech.com/ningda/gin_valid go 1.13