move2kube icon indicating copy to clipboard operation
move2kube copied to clipboard

Go get is removed in go 1.18 and go install does not work

Open jmontleon opened this issue 3 years ago • 1 comments

Describe the bug The docs for alternative installed methods suggests go get as an option, but installing using go get was deprecated in golang 1.17 and removed in 1.18.

go install requires that there be no replaces so it also doesn't work because there are several replaces in the go.mod file for rmove2kube.

To Reproduce

$ rpm -q golang
golang-1.18.6-1.fc36.x86_64

$ go get -u github.com/konveyor/move2kube
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'.
$ go install github.com/konveyor/[email protected]
go: downloading github.com/konveyor/move2kube v0.3.4
go: github.com/konveyor/[email protected] (in github.com/konveyor/[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.

Expected behavior That it is possible to use go install to install move2kube.

Desktop (please complete the following information):

  • OS: Fedora 36

Additional context https://go.dev/doc/go-get-install-deprecation https://github.com/golang/go/issues/44840

jmontleon avatar Sep 13 '22 13:09 jmontleon

The only possible solution currently is to remove the alternate install method. Do feel free to create a PR in the move2kube-website repo.

ashokponkumar avatar Sep 13 '22 13:09 ashokponkumar

Fixed in https://github.com/konveyor/move2kube-website/pull/141

HarikrishnanBalagopal avatar Mar 21 '24 09:03 HarikrishnanBalagopal