all: fix some go-critic linter warnings (#23709)
This doesn't fix all go-critic warnings, just the most serious ones. Co-authored-by: Felix Lange <fjl@twurst.com> Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
committed by
GitHub
parent
e4f570fcc6
commit
778ff94794
@ -29,6 +29,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/ethereum/go-ethereum/accounts"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
@ -100,7 +101,8 @@ func (t *Type) isReferenceType() bool {
|
||||
return false
|
||||
}
|
||||
// Reference types must have a leading uppercase character
|
||||
return unicode.IsUpper([]rune(t.Type)[0])
|
||||
r, _ := utf8.DecodeRuneInString(t.Type)
|
||||
return unicode.IsUpper(r)
|
||||
}
|
||||
|
||||
type Types map[string][]Type
|
||||
|
Reference in New Issue
Block a user