all: use strings.EqualFold for string comparison (#24890)

This commit is contained in:
Håvard Anda Estensen
2022-05-17 13:56:52 +02:00
committed by GitHub
parent e0a9752b96
commit e644d45c14
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -243,12 +243,12 @@ func (c *Compiler) pushBin(v interface{}) {
// isPush returns whether the string op is either any of
// push(N).
func isPush(op string) bool {
return strings.ToUpper(op) == "PUSH"
return strings.EqualFold(op, "PUSH")
}
// isJump returns whether the string op is jump(i)
func isJump(op string) bool {
return strings.ToUpper(op) == "JUMPI" || strings.ToUpper(op) == "JUMP"
return strings.EqualFold(op, "JUMPI") || strings.EqualFold(op, "JUMP")
}
// toBinary converts text to a vm.OpCode