0

Let's say I want to write one of my microservices in a project with go and I also want to keep monolit git repository for the whole project. The problem is that such microservice should be located under GOPATH and I can't even symlink it into my project cause git doesn't support symlinks. What are options to keep the monolit repository for project while having go microservices in it?

Edit: I mean what the best practice to keep go microservice in git for non-golang project.

mirt
  • 1,453
  • 1
  • 17
  • 35

1 Answers1

1

Just for simplicity suppose: project is located in /Users/user/Workspace/Monorepo/go-microservice checked out from github repo github.com/Company/Monorepo.

Make symlink from another side: from GOPATH to required folder. Your repo is kept in standard space and GO can see code with its usual path.

Thus make in folder /Users/user/go/src/github.com/Company symlink Monorepo pointing to first path.

Eugene Lisitsky
  • 12,113
  • 5
  • 38
  • 59