MCPcopy Create free account
hub / github.com/rilldata/rill / parseDotEnv

Method parseDotEnv

runtime/parser/parse_dotenv.go:11–27  ·  view source on GitHub ↗

parseDotEnv parses the .env file at the given path and merges it with the existing env vars

(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

9
10// parseDotEnv parses the .env file at the given path and merges it with the existing env vars
11func (p *Parser) parseDotEnv(ctx context.Context, path string) error {
12 data, err := p.Repo.Get(ctx, path)
13 if err != nil {
14 if os.IsNotExist(err) {
15 return nil
16 }
17 return err
18 }
19 envMap, err := godotenv.Unmarshal(data)
20 if err != nil {
21 return err
22 }
23
24 p.DotEnv[path] = envMap
25
26 return nil
27}

Callers 2

reparseExceptRillYAMLMethod · 0.95
parsePathsMethod · 0.95

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected