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

Method Get

section.go:99–106  ·  view source on GitHub ↗

Get the value (Primative or Section) stored under the name will respond with an error if the value does not exist

(name string)

Source from the content-addressed store, hash-verified

97// Get the value (Primative or Section) stored under the name
98// will respond with an error if the value does not exist
99func (section *Section) Get(name string) (Value, error) {
100 value, ok := section.values[name]
101 var err error
102 if ok == false {
103 err = ErrNotExists
104 }
105 return value, err
106}
107
108// GetBoolean will try to get the value stored under name as a bool
109// will respond with an error if the value does not exist or cannot be converted to a bool

Callers 14

ExistsMethod · 0.95
GetBooleanMethod · 0.95
GetFloatMethod · 0.95
GetIntegerMethod · 0.95
GetListMethod · 0.95
GetSectionMethod · 0.95
GetStringMethod · 0.95
SetBooleanMethod · 0.95
SetFloatMethod · 0.95
SetIntegerMethod · 0.95
SetNullMethod · 0.95
SetStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected