MCPcopy Create free account
hub / github.com/devfile/api / FromBooleanMap

Method FromBooleanMap

pkg/attributes/attributes.go:399–407  ·  view source on GitHub ↗

FromBooleanMap allows adding into the current map of attributes all the attributes contained in the given map of booleans

(strings map[string]bool)

Source from the content-addressed store, hash-verified

397// FromBooleanMap allows adding into the current map of attributes all
398// the attributes contained in the given map of booleans
399func (attributes Attributes) FromBooleanMap(strings map[string]bool) Attributes {
400 for key, value := range strings {
401 rawJSON, _ := json.Marshal(value)
402 attributes[key] = apiext.JSON{
403 Raw: rawJSON,
404 }
405 }
406 return attributes
407}
408
409// Put allows adding an attribute to the
410// current map of attributes.

Callers 1

attributes_test.goFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected