<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.17.5 linux/amd64 </pre> ### Does this issue reproduce with the latest release? Yes ### What did you do? <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on go.dev/play is best. --> https://sourcegraph.com/search?q=context:global+switch+strings.Compare+lang:Go+&patternType=literal ### What did you expect to see? The `strings.Compare` should do one comparison for all cases. ### What did you see instead? The `strings.Compare` does two comparisons for some cases. https://github.com/golang/go/blob/go1.17.5/src/strings/compare.go#L13