trying to structure it this way:
/readme.md
...another root folder files
/cool/main.go
/cool/another.go
/cool/go.mod
However this complicate things. I can't run it with go run cool/main.go. I have to cd into that folder. is there a solution for that? I want to run it from the root folder when develop.
Also I found that go has -C flag which works but it changes the directory. I want to run it from the root folder
Update:
I used go work init ./cool and now I can build or run with go run ./cool
Why don't you move the files up to the upper dir?
Because it's monorepo and i have more files there
Обсуждают сегодня