1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:28:32 -06:00

internal/lsp: use strings.EqualFold instead of ==

Change-Id: I34dc519f25fa976a959a749d4e1a525f5480b963
Reviewed-on: https://go-review.googlesource.com/c/tools/+/172664
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Rebecca Stambler 2019-04-18 11:02:52 -04:00
parent a5870b4038
commit 6732636ccd

View File

@ -62,7 +62,7 @@ func CompareURI(a, b URI) int {
// If we have the same URI basename, we may still have the same file URIs.
if fa, err := a.Filename(); err == nil {
if fb, err := b.Filename(); err == nil {
if filepath.Base(fa) == filepath.Base(fb) {
if strings.EqualFold(filepath.Base(fa), filepath.Base(fb)) {
// Stat the files to check if they are equal.
if infoa, err := os.Stat(fa); err == nil {
if infob, err := os.Stat(fb); err == nil {