common: changed if-else blocks to conform with golint (#16656)

This commit is contained in:
GagziW 2018-05-07 01:26:39 -07:00 committed by Péter Szilágyi
parent d2fe83dc5c
commit d7be5c6619

View File

@ -87,16 +87,14 @@ func Hex2BytesFixed(str string, flen int) []byte {
h, _ := hex.DecodeString(str)
if len(h) == flen {
return h
} else {
}
if len(h) > flen {
return h[len(h)-flen:]
} else {
}
hh := make([]byte, flen)
copy(hh[flen-len(h):flen], h[:])
return hh
}
}
}
func RightPadBytes(slice []byte, l int) []byte {
if l <= len(slice) {