You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
goimports-reviser can operate only on files in a Go module, but Go workspaces allow one to write files outside of modules and use the dependencies listed in the module.
To reproduce:
mkdir analysis lib
cat >analysis/main.go <<EOFpackage mainimport "example.com/hello"func main() { println(hello.Hello("you"))}EOF
cat >go.work <<EOFgo 1.22.2use ./libEOF
cat >lib/lib.go <<EOFpackage hellofunc Hello(who string) string { return "Hello " + who + "!"}EOF
cat >lib/go.mod <<EOFmodule example.com/hellogo 1.22.1EOF# To run the main program:# go run analysis/main.go# Revise imports:
goimports-reviser analysis/main.go
Result:
open go.mod: no such file or directory
Usage of .../goimports-reviser:
...
The text was updated successfully, but these errors were encountered:
goimports-reviser
can operate only on files in a Go module, but Go workspaces allow one to write files outside of modules and use the dependencies listed in the module.To reproduce:
Result:
The text was updated successfully, but these errors were encountered: