Skip to content

Latest commit

 

History

History
32 lines (30 loc) · 782 Bytes

go.md

File metadata and controls

32 lines (30 loc) · 782 Bytes

Go lang

Issues

bazel buildfier

intention

go install github.com/bazelbuild/buildtools/buildifier@latest

error message

can't load package: package github.com/bazelbuild/buildtools/buildifier@latest: cannot use path@version syntax in GOPATH mode

solution

GOPATH=/home/projects/goroot
go install github.com/bazelbuild/buildtools/buildifier
cd $GOPATH/src/github.com/bazelbuild/buildtools/buildifier
bazel build :all

possible (didn't check it) alternative way

go mod init buildifier
# go mod init .
go mod download repo@version
# go mod download github.com/bazelbuild/buildtools/buildifier@latest

buildfier

/home/projects/goroot/bin/buildifier -mode fix {file_path}
# bazel run //bazel/tools/buildifier:fix