Skip to content

Commit 0a84a6f

Browse files
committed
tools: validate HexBytes values are lowercase
1 parent 0cf1f04 commit 0a84a6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/vectorlint/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ func validateHex(value any) error {
125125
return errors.New("invalid non-string HexBytes value")
126126
}
127127

128+
if strVal != strings.ToLower(strVal) {
129+
return errors.New("invalid non-lowercase HexBytes value")
130+
}
131+
128132
_, err := hex.DecodeString(strVal)
129133
if err != nil {
130134
return fmt.Errorf("invalid HexBytes value: %w", err)

0 commit comments

Comments
 (0)