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

Method PutString

pkg/attributes/attributes.go:329–335  ·  view source on GitHub ↗

PutString allows adding a string attribute to the current map of attributes

(key string, value string)

Source from the content-addressed store, hash-verified

327// PutString allows adding a string attribute to the
328// current map of attributes
329func (attributes Attributes) PutString(key string, value string) Attributes {
330 rawJSON, _ := json.Marshal(value)
331 attributes[key] = apiext.JSON{
332 Raw: rawJSON,
333 }
334 return attributes
335}
336
337// FromStringMap allows adding into the current map of attributes all
338// the attributes contained in the given string map

Callers 9

FromStringMapMethod · 0.95
TestValidateCommandsFunction · 0.80
TestValidateGroupFunction · 0.80
TestValidateProjectsFunction · 0.80
TestValidateComponentsFunction · 0.80
attributes_test.goFile · 0.80

Calls

no outgoing calls

Tested by 5

TestValidateCommandsFunction · 0.64
TestValidateGroupFunction · 0.64
TestValidateProjectsFunction · 0.64
TestValidateComponentsFunction · 0.64