Re:./watch
by catlifeonmars on Saturday October 18, 2025 @02:02PM
(#45629236)
That’s because cmd/myapp is not a local path, it’s a universal path. It makes more sense when you type go run github.com/user/name/cmd/myapp
[ Parent
| on HN ]
Re:./watch
by PhilippGille on Sunday October 19, 2025 @02:41PM
(#45636744)
> cmd/myapp is not a local path, it’s a universal path
In `go run` the CLI interprets it as universal path, to be precise. That's exactly the point.
> go run github.com/user/name/cmd/myapp
That's not an alternative when you're working on the app's code locally. You have to use `./cmd/myapp`.
And when you do that multiple times per day/week, after a while you just start always using `./` prefix for local paths.
Re:./watch
by catlifeonmars on Sunday October 19, 2025 @07:45PM
(#45639017)
Would it be preferable to use a URI for go run?
For example
- go run go://cmd/foo
- go run file:///cmd/foo