Skip to content

Commit

Permalink
Remove unreachable code
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
kevinburke committed Nov 1, 2016
1 parent 24c63f5 commit e58d3b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
language: go

script:
- go vet ./...
- go test -v ./...

go:
- 1.3
- 1.4
- 1.5
- 1.6
- 1.7
- tip
6 changes: 1 addition & 5 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit e58d3b7

Please sign in to comment.