Compare commits

...

2 Commits

Author SHA1 Message Date
wangjian f956bce255 修改包地址 2023-01-04 22:25:09 +08:00
wangjian 1d60bf7f13 修改 2023-01-04 22:16:08 +08:00
29 changed files with 81 additions and 82 deletions

View File

@ -1,8 +1,7 @@
package b
import (
"git.hpds.cc/Component/gin_valid.git/gin/binding"
"git.hpds.cc/Component/gin_valid.git/go-playground/validator/v10"
"git.hpds.cc/Component/gin_valid/gin/binding"
"mime"
"net/http"
)

View File

@ -5,10 +5,10 @@
package binding
import (
"git.hpds.cc/Component/gin_valid.git/go-playground/locales/zh"
ut "git.hpds.cc/Component/gin_valid.git/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid.git/go-playground/validator/v10"
zhTrans "git.hpds.cc/Component/gin_valid.git/go-playground/validator/v10/translations/zh"
"git.hpds.cc/Component/gin_valid/go-playground/locales/zh"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
zhTrans "git.hpds.cc/Component/gin_valid/go-playground/validator/v10/translations/zh"
"reflect"
"strings"
"sync"

View File

@ -12,8 +12,8 @@ import (
"strings"
"time"
"git.hpds.cc/Component/gin_valid.git/gin/internal/bytesconv"
"git.hpds.cc/Component/gin_valid.git/gin/internal/json"
"git.hpds.cc/Component/gin_valid/gin/internal/bytesconv"
"git.hpds.cc/Component/gin_valid/gin/internal/json"
)
var errUnknownType = errors.New("unknown type")

View File

@ -10,7 +10,7 @@ import (
"io"
"net/http"
"git.hpds.cc/Component/gin_valid.git/gin/internal/json"
"git.hpds.cc/Component/gin_valid/gin/internal/json"
)
// EnableDecoderUseNumber is used to call the UseNumber method on the JSON

View File

@ -4,7 +4,7 @@ import (
"strconv"
"time"
"git.ningdatech.com/ningda/gin_valid/go-playground/locales/currency"
"git.hpds.cc/Component/gin_valid/go-playground/locales/currency"
)
// // ErrBadNumberValue is returned when the number passed for

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
"git.hpds.cc/Component/gin_valid/go-playground/locales/currency"
)
type zh struct {

View File

@ -4,7 +4,7 @@ import (
"errors"
"fmt"
"git.ningdatech.com/ningda/gin_valid/go-playground/locales"
"git.hpds.cc/Component/gin_valid/go-playground/locales"
)
var (

View File

@ -9,7 +9,7 @@ import (
"io"
"git.ningdatech.com/ningda/gin_valid/go-playground/locales"
"git.hpds.cc/Component/gin_valid/go-playground/locales"
)
type translation struct {

View File

@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"git.ningdatech.com/ningda/gin_valid/go-playground/locales"
"git.hpds.cc/Component/gin_valid/go-playground/locales"
)
const (

View File

@ -3,7 +3,7 @@ package ut
import (
"strings"
"git.ningdatech.com/ningda/gin_valid/go-playground/locales"
"git.hpds.cc/Component/gin_valid/go-playground/locales"
)
// UniversalTranslator holds all locale & translation data

View File

@ -27,11 +27,11 @@ Installation
Use go get.
go get git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10
go get git.hpds.cc/Component/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.hpds.cc/Component/gin_valid/go-playground/validator/v10"
Error Return Value
-------

View File

@ -6,7 +6,7 @@ import (
"reflect"
"strings"
ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
)
const (

View File

@ -1,7 +1,7 @@
package validators
import (
"git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
"reflect"
"strings"
)

View File

@ -1,7 +1,7 @@
package validators
import (
"git.ningdatech.com/ningda/gin_valid/go-playground/validator/v10"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
"github.com/go-playground/assert/v2"
"testing"
)

View File

@ -1,6 +1,6 @@
package validator
import ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator"
import ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
// TranslationFunc is the function type used to register or override
// custom translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -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.hpds.cc/Component/gin_valid/go-playground/locales"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
"git.hpds.cc/Component/gin_valid/go-playground/validator/v10"
)
// RegisterDefaultTranslations registers a set of default translations

View File

@ -9,7 +9,7 @@ import (
"sync"
"time"
ut "git.ningdatech.com/ningda/gin_valid/go-playground/universal-translator"
ut "git.hpds.cc/Component/gin_valid/go-playground/universal-translator"
)
const (

2
go.mod
View File

@ -1,4 +1,4 @@
module git.hpds.cc/Component/gin_valid.git
module git.hpds.cc/Component/gin_valid
go 1.13