jondot / goweight

A tool to analyze and troubleshoot a Go binary size.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"exit status 1", no explanation

walles opened this issue · comments

~/s/moar (master|✔) $ goweight moar
2023/08/15 20:24:45 exit status 1
~/s/moar (master|✔) [1]$

Tried it on https://github.com/walles/moar.

Here's what the go.mod file looks like:

module github.com/walles/moar

go 1.20

require (
	github.com/alecthomas/chroma/v2 v2.4.0
	github.com/google/go-cmp v0.5.9
	github.com/sirupsen/logrus v1.8.1
	golang.org/x/sys v0.1.0
	golang.org/x/term v0.0.0-20210503060354-a79de5458b56
	gotest.tools/v3 v3.3.0
)

require github.com/dlclark/regexp2 v1.4.0 // indirect

Same thing happened to me.

From help: usage: goweight [<flags>] [<packages>] and moar is not package. Try goweight . or goweight github.com/walles/moar

That worked, thanks!

I still think the exit diagnostics should be improved.

Rather than...

exit status 1

... maybe ...

"moar" is not a package name. Try "goweight ." in the go.mod directory and see if that works any better!

?