From 401fde5e9fac14285f8c041198f3e90ce79abec5 Mon Sep 17 00:00:00 2001 From: Oliver Eikemeier Date: Mon, 3 Feb 2025 15:13:22 +0100 Subject: [PATCH] remove quotes around package name in diagnostic message Signed-off-by: Oliver Eikemeier --- src/cmd/compile/internal/types2/format.go | 3 +-- src/go/types/format.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cmd/compile/internal/types2/format.go b/src/cmd/compile/internal/types2/format.go index b61dfda1c819f6..1a0dd8d860044b 100644 --- a/src/cmd/compile/internal/types2/format.go +++ b/src/cmd/compile/internal/types2/format.go @@ -10,7 +10,6 @@ import ( "bytes" "cmd/compile/internal/syntax" "fmt" - "strconv" "strings" ) @@ -129,7 +128,7 @@ func (check *Checker) qualifier(pkg *Package) string { } // If the same package name was used by multiple packages, display the full path. if len(check.pkgPathMap[pkg.name]) > 1 { - return strconv.Quote(pkg.path) + return pkg.path } return pkg.name } diff --git a/src/go/types/format.go b/src/go/types/format.go index 550d22f5aeb791..af7d1ad17426d7 100644 --- a/src/go/types/format.go +++ b/src/go/types/format.go @@ -11,7 +11,6 @@ import ( "fmt" "go/ast" "go/token" - "strconv" "strings" ) @@ -131,7 +130,7 @@ func (check *Checker) qualifier(pkg *Package) string { } // If the same package name was used by multiple packages, display the full path. if len(check.pkgPathMap[pkg.name]) > 1 { - return strconv.Quote(pkg.path) + return pkg.path } return pkg.name }