MCPcopy Index your code
hub / github.com/coder/coder / convertMapIntoVariableValues

Function convertMapIntoVariableValues

codersdk/templatevariables.go:184–196  ·  view source on GitHub ↗
(m map[string]string)

Source from the content-addressed store, hash-verified

182}
183
184func convertMapIntoVariableValues(m map[string]string) []VariableValue {
185 var parsed []VariableValue
186 for key, value := range m {
187 parsed = append(parsed, VariableValue{
188 Name: key,
189 Value: value,
190 })
191 }
192 sort.Slice(parsed, func(i, j int) bool {
193 return parsed[i].Name < parsed[j].Name
194 })
195 return parsed
196}
197
198func parseVariableValuesFromFile(variablesFile string) ([]VariableValue, error) {
199 var values []VariableValue

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected