Remove unreachable code

`go vet` on Go 1.8 errors because this line of code is unreachable. Adds
a check that new code passes go vet, and adds Go 1.7 to travisci.
This commit is contained in:
Kevin Burke 2016-11-01 09:52:33 -07:00
parent 24c63f5652
commit e58d3b7548
No known key found for this signature in database
GPG Key ID: 24B0EF06511BA263
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
}