good morning!!!!

Skip to content
Snippets Groups Projects
Commit d7be5c66 authored by GagziW's avatar GagziW Committed by Péter Szilágyi
Browse files

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

parent d2fe83dc
No related branches found
No related tags found
No related merge requests found
...@@ -87,16 +87,14 @@ func Hex2BytesFixed(str string, flen int) []byte { ...@@ -87,16 +87,14 @@ func Hex2BytesFixed(str string, flen int) []byte {
h, _ := hex.DecodeString(str) h, _ := hex.DecodeString(str)
if len(h) == flen { if len(h) == flen {
return h return h
} else { }
if len(h) > flen { if len(h) > flen {
return h[len(h)-flen:] return h[len(h)-flen:]
} else { }
hh := make([]byte, flen) hh := make([]byte, flen)
copy(hh[flen-len(h):flen], h[:]) copy(hh[flen-len(h):flen], h[:])
return hh return hh
} }
}
}
func RightPadBytes(slice []byte, l int) []byte { func RightPadBytes(slice []byte, l int) []byte {
if l <= len(slice) { if l <= len(slice) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment