MCPcopy Create free account
hub / github.com/devfile/devworkspace-operator / FromMap

Method FromMap

apis/controller/v1alpha1/attributes.go:428–436  ·  view source on GitHub ↗

FromMap allows adding into the current map of attributes all the attributes contained in the given map of interfaces each attribute of the given map is provided as an interface, and can be any value that supports Json Marshaling. An optional error holder can be passed as an argument to receive any

(strings map[string]interface{}, errorHolder *error)

Source from the content-addressed store, hash-verified

426// to receive any error that might have occured during the attributes
427// decoding
428func (attributes Attributes) FromMap(strings map[string]interface{}, errorHolder *error) Attributes {
429 for key, value := range strings {
430 // Here only the last error is returned.
431 // Let's keep it simple and avoid adding a dependency
432 // on an external package just for gathering errors.
433 attributes.Put(key, value, errorHolder)
434 }
435 return attributes
436}
437
438// FromInterface allows completing the map of attributes from the given interface.
439// The given interface, and can be any value

Callers

nothing calls this directly

Calls 1

PutMethod · 0.95

Tested by

no test coverage detected