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

Method SetInteger

section.go:255–264  ·  view source on GitHub ↗

SetInteger will set the value for name as a int64

(name string, value int64)

Source from the content-addressed store, hash-verified

253
254// SetInteger will set the value for name as a int64
255func (section *Section) SetInteger(name string, value int64) {
256 current, err := section.Get(name)
257
258 // Exists just update the value/type
259 if err == nil {
260 current.UpdateValue(value)
261 } else {
262 section.values[name] = NewInteger(value)
263 }
264}
265
266// SetNull will set the value for name as nil
267func (section *Section) SetNull(name string) {

Callers

nothing calls this directly

Calls 3

GetMethod · 0.95
NewIntegerFunction · 0.85
UpdateValueMethod · 0.65

Tested by

no test coverage detected