I have an existing repository (which is organised using the standard Golang project layout)
cmd/
bigproject/
main.go
internal/
...
pkg/
...
vendor/
...
What I would like to do is add an extra directory inside cmd which contains an alternative main application:
cmd/
bigproject/
main.go
myalternativerunner/
main.go
internal/
...
pkg/
...
vendor/
...
But rather than include myalternativerunner inside the main repository, I would like to track it completely separately. To use the project, you do not need to have myalternativerunner included.
Git submodules/subtrees do not seem, to my understanding, solve this use case, as they create a dependency within the main project on myalternativerunner.
My current thinking is to add "myalternativerunner" to my main repository's gitignore and then say "clone myalternativerunner inside cmd if you want it".
Is that the best approach or is there a more idiomatic one?