diff --git a/README.md b/README.md index dadeb0c..b94dbb5 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ Package validator ================ -[![Join the chat at https://gitter.im/bluesuncorp/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bluesuncorp/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Build Status](https://semaphoreci.com/api/v1/projects/ec20115f-ef1b-4c7d-9393-cc76aba74eb4/530054/badge.svg)](https://semaphoreci.com/joeybloggs/validator) -[![Coverage Status](https://coveralls.io/repos/bluesuncorp/validator/badge.svg?branch=v8&service=github)](https://coveralls.io/github/bluesuncorp/validator?branch=v8) -[![GoDoc](https://godoc.org/gopkg.in/bluesuncorp/validator.v8?status.svg)](https://godoc.org/gopkg.in/bluesuncorp/validator.v8) +[![Join the chat at https://gitter.im/bluesuncorp/validator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build Status](https://semaphoreci.com/api/v1/projects/ec20115f-ef1b-4c7d-9393-cc76aba74eb4/523019/badge.svg)](https://semaphoreci.com/joeybloggs/validator) +[![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=v8-development&service=github)](https://coveralls.io/github/go-playground/validator?branch=v8-development) +[![GoDoc](https://godoc.org/gopkg.in/go-playground/validator.v8?status.svg)](https://godoc.org/gopkg.in/go-playground/validator.v8) Package validator implements value validations for structs and individual fields based on tags. @@ -21,15 +21,15 @@ Installation Use go get. - go get gopkg.in/bluesuncorp/validator.v8 + go get gopkg.in/go-playground/validator.v8 or to update - go get -u gopkg.in/bluesuncorp/validator.v8 + go get -u gopkg.in/go-playground/validator.v8 Then import the validator package into your own code. - import "gopkg.in/bluesuncorp/validator.v8" + import "gopkg.in/go-playground/validator.v8" Error Return Value ------- @@ -39,7 +39,7 @@ Validation functions return type error They return type error to avoid the issue discussed in the following, where err is always != nil: * http://stackoverflow.com/a/29138676/3158232 -* https://github.com/bluesuncorp/validator/issues/134 +* https://github.com/go-playground/validator/issues/134 validator only returns nil or ValidationErrors as type error; so in you code all you need to do is check if the error returned is not nil, and if it's not type cast it to type ValidationErrors @@ -53,7 +53,7 @@ validationErrors := err.(validator.ValidationErrors) Usage and documentation ------ -Please see http://godoc.org/gopkg.in/bluesuncorp/validator.v8 for detailed usage docs. +Please see http://godoc.org/gopkg.in/go-playground/validator.v8 for detailed usage docs. ##### Examples: @@ -64,7 +64,7 @@ package main import ( "fmt" - "gopkg.in/bluesuncorp/validator.v8" + "gopkg.in/go-playground/validator.v8" ) // User contains user information @@ -160,7 +160,7 @@ import ( "fmt" "reflect" - "gopkg.in/bluesuncorp/validator.v8" + "gopkg.in/go-playground/validator.v8" ) // DbBackedUser User struct diff --git a/doc.go b/doc.go index fd8ab91..af06a0d 100644 --- a/doc.go +++ b/doc.go @@ -23,7 +23,7 @@ method here: https://golang.org/pkg/os/#Open. They return type error to avoid the issue discussed in the following, where err is always != nil: http://stackoverflow.com/a/29138676/3158232 -https://github.com/bluesuncorp/validator/issues/134 +https://github.com/go-playground/validator/issues/134 validator only returns nil or ValidationErrors as type error; so in you code all you need to do is check if the error returned is not nil, and if it's not type cast it to type ValidationErrors diff --git a/examples/custom/custom.go b/examples/custom/custom.go index 42054db..ee14bd2 100644 --- a/examples/custom/custom.go +++ b/examples/custom/custom.go @@ -6,7 +6,7 @@ import ( "fmt" "reflect" - "gopkg.in/bluesuncorp/validator.v8" + "gopkg.in/go-playground/validator.v8" ) // DbBackedUser User struct diff --git a/examples/simple/simple.go b/examples/simple/simple.go index b91610b..d16cc83 100644 --- a/examples/simple/simple.go +++ b/examples/simple/simple.go @@ -7,7 +7,7 @@ import ( sql "database/sql/driver" - "gopkg.in/bluesuncorp/validator.v8" + "gopkg.in/go-playground/validator.v8" ) // User contains user information diff --git a/examples_test.go b/examples_test.go index 70129e8..fde2246 100644 --- a/examples_test.go +++ b/examples_test.go @@ -3,7 +3,7 @@ package validator_test import ( "fmt" - "gopkg.in/bluesuncorp/validator.v8" + "gopkg.in/go-playground/validator.v8" ) func ExampleValidate_new() { diff --git a/validator_test.go b/validator_test.go index b32b0cd..071a24f 100644 --- a/validator_test.go +++ b/validator_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - . "gopkg.in/bluesuncorp/assert.v1" + . "gopkg.in/go-playground/assert.v1" ) // NOTES: