GetBoolean returns the bool value or provided default
(k string, dv bool)
| 270 | |
| 271 | // GetBoolean returns the bool value or provided default |
| 272 | func (hf *hookFields) GetBoolean(k string, dv bool) bool { |
| 273 | val, ok := hf.Values[k] |
| 274 | if ok { |
| 275 | return val == "true" |
| 276 | } |
| 277 | return dv |
| 278 | } |
| 279 | |
| 280 | // GetArray returns the array value or provided default |
| 281 | func (hf *hookFields) GetArray(k string, dv []string) []string { |