Answer the question
In order to leave comments, you need to log in
How to work with goimports?
Hello!
I ran the command go get golang.org/x/tools/cmd/goimports.
When I run the goimports command, I get the error:
The 'goimports' program is not currently installed. You can install it by running:
sudo apt install golang-golang-x-tools.
When I run the go imports name.go command, I get the error:
go imports: unknown command
Run 'go help' for usage.
At the same time, gofmt works fine. What did you do wrong during installation? Or maybe I'm trying to use the goimports command wrong?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question