Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to watch go files after installing Compile Daemon

Installed using, go get github.com/githubnemo/CompileDaemon and go install github.com/githubnemo/CompileDaemon

When I try to run it using -> CompileDaemon --compile="./folderName"

It gives -> zsh: command not found: CompileDaemon

Note:

  • I'm using oh-my-zsh.
  • My GOPATH and GOBIN are not default one's, I set it to goWorkspace
like image 601
Praful Nalatwad Avatar asked Dec 05 '25 01:12

Praful Nalatwad


1 Answers

First, don't forget that the use of go get to build and install packages is deprecated (In earlier versions of Go, 'go get' was used to build and install packages. Now, 'go get' is dedicated to adjusting dependencies in go.mod.)

All you need should be go install:

go install github.com/githubnemo/CompileDaemon@latest

That should generate a CompileDaemon executable in your directory named by the GOBIN environment variable.

But you need $GOBIN itself in your $PATH (from your ~/.zshrc for instance):

export PATH="$PATH:$GOBIN"
like image 109
VonC Avatar answered Dec 06 '25 17:12

VonC