mirror of
https://github.com/golang/go
synced 2024-11-18 10:04:43 -07: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:
parent
a5870b4038
commit
6732636ccd
@ -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 we have the same URI basename, we may still have the same file URIs.
|
||||||
if fa, err := a.Filename(); err == nil {
|
if fa, err := a.Filename(); err == nil {
|
||||||
if fb, err := b.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.
|
// Stat the files to check if they are equal.
|
||||||
if infoa, err := os.Stat(fa); err == nil {
|
if infoa, err := os.Stat(fa); err == nil {
|
||||||
if infob, err := os.Stat(fb); err == nil {
|
if infob, err := os.Stat(fb); err == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user