brename
brename copied to clipboard
Method 2 installation with go fails
Running go get -u github.com/shenwei356/brename/ fails with:
go: go.mod file not found in current directory or any parent directory.
But it is there:
Try this:
# --------------- the development version --------------
git clone https://github.com/shenwei356/brename
cd brename/
go build
# The executable binary file is located in:
# ./brename
# You can also move it to anywhere in the $PATH
mkdir -p $HOME/bin
cp ./brename $HOME/bin/
Dear @shenwei356, Go team recommends using go install instead of go get, but…
$ go version
go version go1.23.6 windows/amd64
$ go install -ldflags="-s -w" github.com/shenwei356/brename@latest
go: downloading github.com/shenwei356/brename v2.11.0+incompatible
go: finding module for package github.com/mattn/go-colorable
go: finding module for package github.com/fatih/color
go: finding module for package github.com/shenwei356/breader
go: finding module for package github.com/shenwei356/go-logging
go: downloading github.com/shenwei356/breader v0.3.2
go: downloading github.com/shenwei356/go-logging v0.0.0-20171012171522-c6b9702d88ba
go: finding module for package github.com/shenwei356/natsort
go: finding module for package github.com/shenwei356/util/pathutil
go: downloading github.com/shenwei356/natsort v0.0.0-20220117010048-580176ad49fb
go: finding module for package github.com/spf13/cobra
go: downloading github.com/shenwei356/util v0.5.3
go: downloading github.com/spf13/cobra v1.9.1
go: found github.com/fatih/color in github.com/fatih/color v1.18.0
go: found github.com/mattn/go-colorable in github.com/mattn/go-colorable v0.1.14
go: found github.com/shenwei356/breader in github.com/shenwei356/breader v0.3.2
go: found github.com/shenwei356/go-logging in github.com/shenwei356/go-logging v0.0.0-20171012171522-c6b9702d88ba
go: found github.com/shenwei356/natsort in github.com/shenwei356/natsort v0.0.0-20220117010048-580176ad49fb
go: found github.com/shenwei356/util/pathutil in github.com/shenwei356/util v0.5.3
go: found github.com/spf13/cobra in github.com/spf13/cobra v1.9.1
go: downloading github.com/shenwei356/xopen v0.2.2
go: downloading github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553
go: downloading github.com/spf13/pflag v1.0.6
go: downloading github.com/klauspost/compress v1.15.12
go: downloading github.com/klauspost/pgzip v1.2.5
go: downloading github.com/ulikunitz/xz v0.5.10
$ brename --version
brename v2.11.0
Checking new version...
New version available: brename v2.14.0 at https://github.com/shenwei356/brename/releases/tag/v2.14.0
Please, attach latest tag to the latest version of brename.
Well, it's strange. The version information is not right. Please directly download the binaries.
https://goproxy.cn/github.com/shenwei356/brename/@v/list
v2.1.1+incompatible
v2.1.2+incompatible
v2.1.3+incompatible
v2.2.0+incompatible
v2.3.0+incompatible
v2.4.0+incompatible
v2.5.0+incompatible
v2.5.1+incompatible
v2.5.2+incompatible
v2.6.0+incompatible
v2.7.0+incompatible
v2.8.0+incompatible
v2.8.1+incompatible
v2.9.0+incompatible
v2.10.0+incompatible
v2.10.1+incompatible
v2.11.0+incompatible
My other repos don't have this problem, such as https://goproxy.cn/github.com/shenwei356/rush/@v/list .
Something wrong with the meta information. It's empty here: https://goproxy.cn/github.com/shenwei356/brename/v2/@v/list
However, my another tool with version 2+ works fine:
https://goproxy.cn/github.com/shenwei356/seqkit/v2/@v/list