MCPcopy Create free account
hub / github.com/brettlangdon/forge / SetFloat

Method SetFloat

section.go:243–252  ·  view source on GitHub ↗

SetFloat will set the value for name as a float64

(name string, value float64)

Source from the content-addressed store, hash-verified

241
242// SetFloat will set the value for name as a float64
243func (section *Section) SetFloat(name string, value float64) {
244 current, err := section.Get(name)
245
246 // Exists just update the value/type
247 if err == nil {
248 current.UpdateValue(value)
249 } else {
250 section.values[name] = NewFloat(value)
251 }
252}
253
254// SetInteger will set the value for name as a int64
255func (section *Section) SetInteger(name string, value int64) {

Callers

nothing calls this directly

Calls 3

GetMethod · 0.95
NewFloatFunction · 0.85
UpdateValueMethod · 0.65

Tested by

no test coverage detected