Skip to content

Commit 3f4f84c

Browse files
joeybloggsjoeybloggs
authored andcommitted
Merge branch 'v6-development' into merge
Conflicts: README.md baked_in.go benchmarks_test.go util.go validator_test.go Changes to be committed: modified: README.md modified: baked_in.go
2 parents d7b348e + 19d8904 commit 3f4f84c

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Package validator
33

44
[![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)
55
[![Build Status](https://semaphoreci.com/api/v1/projects/ec20115f-ef1b-4c7d-9393-cc76aba74eb4/487374/badge.svg)](https://semaphoreci.com/joeybloggs/validator)
6-
[![Coverage Status](https://coveralls.io/repos/bluesuncorp/validator/badge.svg?branch=v6)](https://coveralls.io/r/bluesuncorp/validator?branch=v6)
7-
[![GoDoc](https://godoc.org/gopkg.in/bluesuncorp/validator.v6?status.svg)](https://godoc.org/gopkg.in/bluesuncorp/validator.v6)
6+
[![Coverage Status](https://coveralls.io/repos/bluesuncorp/validator/badge.svg?branch=v7)](https://coveralls.io/r/bluesuncorp/validator?branch=v7)
7+
[![GoDoc](https://godoc.org/gopkg.in/bluesuncorp/validator.v7?status.svg)](https://godoc.org/gopkg.in/bluesuncorp/validator.v7)
88

99
Package validator implements value validations for structs and individual fields based on tags.
1010

@@ -20,20 +20,20 @@ Installation
2020

2121
Use go get.
2222

23-
go get gopkg.in/bluesuncorp/validator.v6
23+
go get gopkg.in/bluesuncorp/validator.v7
2424

2525
or to update
2626

27-
go get -u gopkg.in/bluesuncorp/validator.v6
27+
go get -u gopkg.in/bluesuncorp/validator.v7
2828

2929
Then import the validator package into your own code.
3030

31-
import "gopkg.in/bluesuncorp/validator.v6"
31+
import "gopkg.in/bluesuncorp/validator.v7"
3232

3333
Usage and documentation
3434
------
3535

36-
Please see http://godoc.org/gopkg.in/bluesuncorp/validator.v6 for detailed usage docs.
36+
Please see http://godoc.org/gopkg.in/bluesuncorp/validator.v7 for detailed usage docs.
3737

3838
##### Examples:
3939

@@ -143,7 +143,7 @@ import (
143143
"fmt"
144144
"reflect"
145145

146-
"gopkg.in/bluesuncorp/validator.v6"
146+
"gopkg.in/bluesuncorp/validator.v7"
147147
)
148148

149149
// DbBackedUser User struct
@@ -192,7 +192,7 @@ NOTE: allocations for structs are up from v5, however ns/op for parallel operati
192192
It was a decicion not to cache struct info because although it reduced allocation to v5 levels, it
193193
hurt parallel performance too much.
194194
```go
195-
$ go test -cpu=4 -bench=. -benchmem=true
195+
go test -cpu=4 -bench=. -benchmem=true
196196
PASS
197197
BenchmarkFieldSuccess-4 5000000 332 ns/op 16 B/op 1 allocs/op
198198
BenchmarkFieldFailure-4 5000000 334 ns/op 16 B/op 1 allocs/op

baked_in.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ func isLt(v *Validate, topStruct reflect.Value, currentStruct reflect.Value, fie
10231023
// value. For numbers, it's a simple lesser-than test; for
10241024
// strings it tests the number of characters whereas for maps
10251025
// and slices it tests the number of items.
1026-
func hasMaxOf(v *Validate, topStruct reflect.Value, currentStruct reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
10271026

1027+
func hasMaxOf(v *Validate, topStruct reflect.Value, currentStruct reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
10281028
return isLte(v, topStruct, currentStruct, field, fieldType, fieldKind, param)
10291029
}

0 commit comments

Comments
 (0)