I have different directories such as DBconnection
, APIRequest
, APIResponse
etc.
All codes are interconnected. How can I run these at a time. The go run .go needed to be exist all files in a directory.
But I have multiple directories.
Any kind of help or suggestion will be appreciated
If I understand your question correctly: you could write a little shell script executing them one after the other:
#!/usr/bin/env bash
go run /ParentPath/DBconnection/execfile.go
go run /ParentPath/APIRequest/execfile.go
go run /ParentPath/APIResponse/execfile.go
You could also create a go program executing the different packages in go routines, then you do not need to start multiple go programs.