my app consists of several golang written programs that run inside docker/k8s micro-services arch. Now, we want it to run directly on Linux without docker/k8s. So we’re thinking to merge all the programs into a single binary program. Which would be best way since each program is organized in cmd/main.go, internal/{aaa,bbb,ccc}/xxx.go? Thanks!
What I can think of now is to re-organize each service in pkg/.../xxx.go, including all current code in main.go. Then my all-in-one.go will import all the main.go code.
Any suggestions?
Edit:
Update reason for merging. 1) the target platform is embedded system, I'd like to make the app as small as possible, and as easier to deploy as possible. 2) I'd also like to try use the all-in-one app in system test, as it's more light-weight to run locally on developer machine than the real micro-service k8s version.