MCPcopy Create free account
hub / github.com/celer-pkg/celer / loadProjectVars

Method loadProjectVars

configs/celer.go:495–512  ·  view source on GitHub ↗

loadProjectVars loads project-level variables into global ExprVars.

()

Source from the content-addressed store, hash-verified

493
494// loadProjectVars loads project-level variables into global ExprVars.
495func (c *Celer) loadProjectVars() {
496 for _, item := range c.project.Vars {
497 parts := strings.Split(item, "=")
498 if len(parts) != 2 {
499 continue
500 }
501
502 key := strings.TrimSpace(parts[0])
503 if key == "" {
504 continue
505 }
506
507 value := strings.TrimSpace(parts[1])
508 value = strings.Trim(value, `"`)
509 value = c.exprVars.Expand(value)
510 c.exprVars.Put(key, value)
511 }
512}

Callers 1

InitWithPlatformMethod · 0.95

Calls 2

ExpandMethod · 0.80
PutMethod · 0.80

Tested by

no test coverage detected