Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/goimports: #30235

Closed
EngHabu opened this issue Feb 14, 2019 · 5 comments
Closed

x/tools/cmd/goimports: #30235

EngHabu opened this issue Feb 14, 2019 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@EngHabu
Copy link

EngHabu commented Feb 14, 2019

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

go version go1.11.5 darwin/amd64

Does this issue reproduce with the latest release?

yes (and by latest release I just ran "go get golang.org/x/tools/cmd/goimports")

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users//Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users//src/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.5/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.5/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/lh/1lwrhs7j7xj69b4hdr3k1d800000gp/T/go-build658062591=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Ran
goimports -w myfile.go

What did you expect to see?

nothing (it should already be formatted)

What did you see instead?

	"k8s.io/api/core/v1"
>>>	v1 "k8s.io/api/core/v1" <<<< this was added to the imports (causing a build error)
@gopherbot gopherbot added this to the Unreleased milestone Feb 14, 2019
@heschi
Copy link
Contributor

heschi commented Feb 14, 2019

cc @ianthehat. A more complete repro would be helpful, though.

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 14, 2019
@bradfitz
Copy link
Contributor

Did you run go get golang.org/x/tools/cmd/goimports or go get -u golang.org/x/tools/cmd/goimports? The former does nothing if you already have it.

@EngHabu
Copy link
Author

EngHabu commented Feb 17, 2019 via email

@agnivade
Copy link
Contributor

@EngHabu - Could you provide us a standalone file on which we can execute goimports and reproduce this ? Should be easy if you are consistently getting this.

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
@heschi
Copy link
Contributor

heschi commented Nov 7, 2019

No response, closing.

@heschi heschi closed this as completed Nov 7, 2019
@golang golang locked and limited conversation to collaborators Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants