Get returns the value the the variable with the provided key and a boolean that indicates if the value was found or not. If the value is not found, the returned variable is a zero value and the bool is false.
(key string)
| 48 | // that indicates if the value was found or not. If the value is not found, the |
| 49 | // returned variable is a zero value and the bool is false. |
| 50 | func (vars *Vars) Get(key string) (Var, bool) { |
| 51 | if vars == nil || vars.om == nil { |
| 52 | return Var{}, false |
| 53 | } |
| 54 | defer vars.mutex.RUnlock() |
| 55 | vars.mutex.RLock() |
| 56 | return vars.om.Get(key) |
| 57 | } |
| 58 | |
| 59 | // Set sets the value of the variable with the provided key to the provided |
| 60 | // value. If the variable already exists, its value is updated. If the variable |
no outgoing calls