gobwas / glob

Go glob
MIT License
948 stars 63 forks source link

Fixed vet error 'syntax/ast/parser.go:86: unreachable code' #30

Open kamermans opened 5 years ago

kamermans commented 5 years ago

This PR removes an unreachable line of code that is flagged by go tool vet .:

$ go tool vet .
syntax/ast/parser.go:86: unreachable code

Personally, I prefer the catch-all return statement and I think it's annoying that vet doesn't like it, but in any case, this PR removes that line since the switch...default(return) makes it unreachable, and therefore untestable.