mozillazg/go-unidecode

CLI tool does not install with documented command

Closed this issue · 1 comments

This command from the README:

$ go get -u github.com/mozillazg/go-unidecode/unidecode

does not install the executable in $GOPATH/bin. The behaviour of go get changed in 2021 (Go 1.17). For more info on this, see Deprecation of 'go get' for installing executables.

For this a go install command is required, but a naieve attempt also fails:

$ go install github.com/mozillazg/go-unidecode/unidecode@latest
go: github.com/mozillazg/go-unidecode/unidecode@latest (in github.com/mozillazg/go-unidecode/unidecode@v0.0.0-20220820075503-98ea07f60ab0):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

It is this replacement rule that's causing this error:

replace github.com/mozillazg/go-unidecode => ../

@sybrenstuvel Thanks for reporting. Feel free to send a pull request to fix this issue.