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

Method PutInteger

pkg/attributes/attributes.go:367–373  ·  view source on GitHub ↗

PutInteger allows adding an integer attribute to the current map of attributes

(key string, value int)

Source from the content-addressed store, hash-verified

365// PutInteger allows adding an integer attribute to the
366// current map of attributes
367func (attributes Attributes) PutInteger(key string, value int) Attributes {
368 rawJSON, _ := json.Marshal(value)
369 attributes[key] = apiext.JSON{
370 Raw: rawJSON,
371 }
372 return attributes
373}
374
375// FromIntegerMap allows adding into the current map of attributes all
376// the attributes contained in the given map of integers

Callers 1

attributes_test.goFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected