Merge pull request #180 from kevinburke/fix-unreachable

Remove unreachable code
This commit is contained in:
Dave Grijalva 2016-11-01 12:39:35 -07:00 committed by GitHub
commit 9ed569b5d1
2 changed files with 6 additions and 5 deletions

View File

@ -1,8 +1,13 @@
language: go
script:
- go vet ./...
- go test -v ./...
go:
- 1.3
- 1.4
- 1.5
- 1.6
- 1.7
- tip

View File

@ -51,13 +51,9 @@ func (e ValidationError) Error() string {
} else {
return "token is invalid"
}
return e.Inner.Error()
}
// No errors
func (e *ValidationError) valid() bool {
if e.Errors > 0 {
return false
}
return true
return e.Errors == 0
}