Home > front end >  How to run go generate with executable file in the same folder
How to run go generate with executable file in the same folder

Time:12-22

I have the executable file in the same folder as where go generate command is written

when I run the command it gives an error

 executable file not found in $PATH

But I have the executable in the same folder See image below

enter image description here

Currently I am running

go:generate convert

How to make go:generate look for binary in the same folder

CodePudding user response:

Try:

go:generate ./convert

Your executable convert is not in your system's path, so you need to give it a relative (as in the above case) or an absolute path for go generate or any sub-system to execute it.

  •  Tags:  
  • go
  • Related