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

Method PutFloat

pkg/attributes/attributes.go:348–354  ·  view source on GitHub ↗

PutFloat allows adding a float attribute to the current map of attributes

(key string, value float64)

Source from the content-addressed store, hash-verified

346// PutFloat allows adding a float attribute to the
347// current map of attributes
348func (attributes Attributes) PutFloat(key string, value float64) Attributes {
349 rawJSON, _ := json.Marshal(value)
350 attributes[key] = apiext.JSON{
351 Raw: rawJSON,
352 }
353 return attributes
354}
355
356// FromFloatMap allows adding into the current map of attributes all
357// the attributes contained in the given map of floats

Callers 2

FromFloatMapMethod · 0.95
attributes_test.goFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected