Skip to content

Commit 2ba88cc

Browse files
fix: remove redundant strings.ToLower in onerrorCommand
strings.EqualFold is already case-insensitive, making the ToLower call unnecessary.
1 parent 460b0c9 commit 2ba88cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/sqlcmd/commands.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,9 @@ func onerrorCommand(s *Sqlcmd, args []string, line uint) error {
569569
}
570570
params := strings.TrimSpace(args[0])
571571

572-
if strings.EqualFold(strings.ToLower(params), "exit") {
572+
if strings.EqualFold(params, "exit") {
573573
s.Connect.ExitOnError = true
574-
} else if strings.EqualFold(strings.ToLower(params), "ignore") {
574+
} else if strings.EqualFold(params, "ignore") {
575575
s.Connect.IgnoreError = true
576576
s.Connect.ExitOnError = false
577577
} else {

0 commit comments

Comments
 (0)