Get the value (Primative or Section) stored under the name will respond with an error if the value does not exist
(name string)
| 97 | // Get the value (Primative or Section) stored under the name |
| 98 | // will respond with an error if the value does not exist |
| 99 | func (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 |
no outgoing calls
no test coverage detected