Skip to content

x/tools/cmd/goimports: adds redundant alias to package paths containing hyphen/dash #46635

@perrydunn

Description

@perrydunn

What version of Go are you using (go version)?

$ go version
go version go1.14.14 linux/amd64

Does this issue reproduce with the latest release?

Yes (compiled with go1.16.5 too)

$ git log -n 1
commit 1225b6f53f675b0732bdf025af585b173de322ec (HEAD -> master, origin/master, origin/HEAD)

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/peregrine/.cache/go-build"
GOENV="/home/peregrine/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/peregrine/go:/home/peregrine/core3:/home/peregrine/core3/src/plz-out/go:/home/peregrine/core3/src/plz-out/gen/third_party/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/tm/tools/go/1.14.14/usr/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/tm/tools/go/1.14.14/usr/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="cc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/peregrine/go/src/golang.org/x/tools/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build730235714=/tmp/go-build -gno-record-gcc-switches"

What did you do?

https://play.golang.org/p/8VOphLYHxto

What did you expect to see?

No redundant alias

What did you see instead?

Redundant alias added

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions