divan / expvarmon

TermUI based monitor for Go apps using expvars (/debug/vars). Quickest way to monitor your Go app(s).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't run on MacOs

Igorpollo opened this issue · comments

I'm trying to run it on MacOs.
recieving this:

➜  / expvarmon -ports="8181"

zsh: command not found: expvarmon

thanks

Hey @Igorpollo, when you run command from shell, it is normally looking for binary in specific folders, listed in PATH environment variable. If you install Go app via go install – like go install github.com/divan/expvarmon – it installs it into the folder $GOPATH/bin. So to be able to run it like that, you have to add your GOPATH/bin to that env variable PATH in your zsh setup:

export PATH=$GOPATH/bin:$PATH

Or, if you build app yourself in the sources directory, just run it from the current folder:

./expvarmon -ports="8181"
commented

since GOPATH is not set automatically anymore with the install unless you've done it manually, what you need to make sure is your go binary folder is exported in the PATH (ie. you can do go env GOPATH to see where your go folder is and then export the /bin folder as shown above)