Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove replace and update installation docs #310

Merged
merged 2 commits into from
Mar 20, 2025

Conversation

lovromazgon
Copy link
Contributor

The current installation docs instruct to use go get -u github.com/shenwei356/csvtk/csvtk. Actually that doesn't work anymore, not outside of a go project:

$ go get -u github.com/shenwei356/csvtk/csvtk
go: go.mod file not found in current directory or any parent directory.
	'go get' is no longer supported outside a module.
	To build and install a command, use 'go install' with a version,
	like 'go install example.com/cmd@latest'
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.

Trying to install it using go install however doesn't work because go.mod contains a replace directive:

go install github.com/shenwei356/csvtk/csvtk@latest
go: github.com/shenwei356/csvtk/csvtk@latest (in github.com/shenwei356/[email protected]):
	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.

I see that the replace directive is actually redundant, as the dependency in question is not even used. I removed the replace directive and updated the installation instructions to use go install, which should work after the PR is merged and a new version is released.

@shenwei356
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants