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

Method FromIntegerMap

pkg/attributes/attributes.go:377–385  ·  view source on GitHub ↗

FromIntegerMap allows adding into the current map of attributes all the attributes contained in the given map of integers

(strings map[string]int)

Source from the content-addressed store, hash-verified

375// FromIntegerMap allows adding into the current map of attributes all
376// the attributes contained in the given map of integers
377func (attributes Attributes) FromIntegerMap(strings map[string]int) Attributes {
378 for key, value := range strings {
379 rawJSON, _ := json.Marshal(value)
380 attributes[key] = apiext.JSON{
381 Raw: rawJSON,
382 }
383 }
384 return attributes
385}
386
387// PutBoolean allows adding a boolean attribute to the
388// current map of attributes

Callers 1

attributes_test.goFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected