gin
gin copied to clipboard
Run arbitrary Go file and watch $GOPATH
I thought I had a standard use-case when I wanted to go run
a specific .go file every time it or something in the $GOPATH (where its dependencies live) changes.
But the command gin -t "/go/src" x.go
fails with:
[gin] ERROR! Build failed.
can't load package: package .: no buildable Go source files in /go/src
Is there any way to watch $GOPATH from outside of it? (Or also watch items above the current directory)
I did the following, 4 years later, from the top of my repo:
gin --build cmd/web/ --path . cmd/web/main.go