MCPcopy Index your code
hub / github.com/rilldata/rill / groupVariablesByEnv

Function groupVariablesByEnv

cli/cmd/env/pull.go:133–144  ·  view source on GitHub ↗
(res *adminv1.GetProjectVariablesResponse)

Source from the content-addressed store, hash-verified

131}
132
133func groupVariablesByEnv(res *adminv1.GetProjectVariablesResponse) map[string]map[string]string {
134 perEnvVars := make(map[string]map[string]string)
135 for _, v := range res.Variables {
136 vars, ok := perEnvVars[v.Environment]
137 if !ok {
138 vars = make(map[string]string)
139 perEnvVars[v.Environment] = vars
140 }
141 vars[v.Name] = v.Value
142 }
143 return perEnvVars
144}
145
146func pathForEnv(env string) string {
147 if env == "" {

Callers 2

PushCmdFunction · 0.70
PullVarsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected