linting: add to Makefile & do some fixes

This commit is contained in:
Zach Ramsay
2017-09-22 11:42:29 -04:00
parent 2130c329eb
commit d6e03d2368
20 changed files with 82 additions and 51 deletions

View File

@ -31,10 +31,7 @@ func LeftPadString(s string, totalLength int) string {
func IsHex(s string) bool {
if len(s) > 2 && s[:2] == "0x" {
_, err := hex.DecodeString(s[2:])
if err != nil {
return false
}
return true
return err == nil
}
return false
}