Here is the directory structure of my project (
├── cmd │ ├── c │ │ └── main.go │ └── d │ └── main.go ├── config │ ├── config.go │ ├── default.json │ └── development.json ├── go.mod ├── go.sum ├── log │ └── log.go ├── main.go
I need to compile 2 binaries (one for each module in cmd/).
I have tried running
GO111MODULE=on go build ./cmd/c from project root (
~/go/src/bitbucket.org/a/b). It silently finishes without doing anything.
I also tried running
GO111MODULE=on go build -o test ./cmd/c. It created 29kb
test file. When i add execution rights to it and run, it finishes with error:
./test: 2: ./test: Syntax error: newline unexpected
I have tried using go 1.12.5 and go 1.11.10.
Also when i put
main.go file from any of the cmd directories to project root directory and build, the compiler builds it just fine (binary file size is ~33mb).
Is it possible to use 2 compiler entry points in a single project?