bcicen/ctop

`go.mod` should be tidy up by `go mod tidy`?

spike014 opened this issue · 1 comments

I found ctop is written by golang.

That means I can install it by go install if I had install golang?

I try like:

✗ go install github.com/bcicen/ctop@latest

But I got this:

go: github.com/bcicen/ctop@latest (in github.com/bcicen/ctop@v0.7.7):
        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.

Then I found go.mod in project:

module github.com/bcicen/ctop

require (
	github.com/BurntSushi/toml v0.3.1
	github.com/c9s/goprocinfo v0.0.0-20170609001544-b34328d6e0cd
	github.com/fsouza/go-dockerclient v1.7.0
	github.com/gizak/termui v2.3.1-0.20180817033724-8d4faad06196+incompatible
	github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b // indirect  --------------- this line
	github.com/jgautheron/codename-generator v0.0.0-20150829203204-16d037c7cc3c
	github.com/mattn/go-runewidth v0.0.2
	github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d
	github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
	github.com/op/go-logging v0.0.0-20160211212156-b2cb9fa56473
	github.com/opencontainers/runc v1.1.0
	github.com/pkg/browser v0.0.0-20201207095918-0426ae3fba23
	github.com/pkg/errors v0.9.1
	github.com/stretchr/testify v1.4.0
)

I clone the project, and run go mod tidy,

I got go.mod like:

module github.com/bcicen/ctop

require (
	github.com/BurntSushi/toml v0.3.1
	github.com/c9s/goprocinfo v0.0.0-20170609001544-b34328d6e0cd
	github.com/fsouza/go-dockerclient v1.7.0
	github.com/gizak/termui v2.3.1-0.20180817033724-8d4faad06196+incompatible
	github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b   // ---------- this line changed without indirect
	github.com/jgautheron/codename-generator v0.0.0-20150829203204-16d037c7cc3c
	github.com/mattn/go-runewidth v0.0.2
	github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d
	github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
	github.com/op/go-logging v0.0.0-20160211212156-b2cb9fa56473
	github.com/opencontainers/runc v1.1.0
	github.com/pkg/browser v0.0.0-20201207095918-0426ae3fba23
	github.com/pkg/errors v0.9.1
)

Is this bug? Should I PR to fix it?

Or ctop just make it like that to let user DO NOT install ctop by go install?

It's not bug. In my opinion It would be a good practice execute go mod tidy, go vet ./... before commit