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

Method SetBoolean

section.go:231–240  ·  view source on GitHub ↗

SetBoolean will set the value for name as a bool

(name string, value bool)

Source from the content-addressed store, hash-verified

229
230// SetBoolean will set the value for name as a bool
231func (section *Section) SetBoolean(name string, value bool) {
232 current, err := section.Get(name)
233
234 // Exists just update the value/type
235 if err == nil {
236 current.UpdateValue(value)
237 } else {
238 section.values[name] = NewBoolean(value)
239 }
240}
241
242// SetFloat will set the value for name as a float64
243func (section *Section) SetFloat(name string, value float64) {

Callers

nothing calls this directly

Calls 3

GetMethod · 0.95
NewBooleanFunction · 0.85
UpdateValueMethod · 0.65

Tested by

no test coverage detected