gin icon indicating copy to clipboard operation
gin copied to clipboard

Run arbitrary Go file and watch $GOPATH

Open tp opened this issue 10 years ago • 1 comments

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)

tp avatar Feb 16 '15 20:02 tp

I did the following, 4 years later, from the top of my repo:

gin --build cmd/web/ --path . cmd/web/main.go

blaskovicz avatar May 10 '19 18:05 blaskovicz