Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvP ¶
type EnvP interface { CmdFromMap(envMap map[string]string, cmd string, cmdArgs []string) CmdFromFile(envFile string, cmd string, cmdArgs []string) }
func Init ¶
Init pEnv with the time taken by processes to read env. Each process is launched in a go routine. After processStartupTime duration, the env will be cleared
Eg.
func main(){ pEnv := pEnv.Init(time.Millisecond * 3) pEnv.CmdFromFile(".env", "./main", nil) pEnv.CmdFromMap(map[string]string{"HTTP_PORT": "7001", "HOST": "localhost"}, "./main", nil) <- make(chan bool) }
Click to show internal directories.
Click to hide internal directories.