MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / LoadEnv

Function LoadEnv

api/pkg/di/config.go:12–17  ·  view source on GitHub ↗

LoadEnv will read your .env file(s) and load them into ENV for this process.

(filenames ...string)

Source from the content-addressed store, hash-verified

10
11// LoadEnv will read your .env file(s) and load them into ENV for this process.
12func LoadEnv(filenames ...string) {
13 err := godotenv.Load(filenames...)
14 if err != nil {
15 log.Fatalf("Fatal: cannot load .env file: %v", err)
16 }
17}
18
19func getEnvWithDefault(key, defaultValue string) string {
20 value := os.Getenv(key)

Callers

nothing calls this directly

Calls 1

LoadMethod · 0.65

Tested by

no test coverage detected