MCPcopy
hub / github.com/go-task/task / readDotEnv

Function readDotEnv

experiments/experiments.go:77–89  ·  view source on GitHub ↗
(dir string)

Source from the content-addressed store, hash-verified

75}
76
77func readDotEnv(dir string) {
78 env, err := godotenv.Read(getFilePath(".env", dir))
79 if err != nil {
80 return
81 }
82
83 // If the env var is an experiment, set it.
84 for key, value := range env {
85 if strings.HasPrefix(key, envPrefix) {
86 os.Setenv(key, value)
87 }
88 }
89}

Callers 1

ParseWithConfigFunction · 0.85

Calls 2

getFilePathFunction · 0.85
ReadMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…