PutBoolean allows adding a boolean attribute to the current map of attributes
(key string, value bool)
| 387 | // PutBoolean allows adding a boolean attribute to the |
| 388 | // current map of attributes |
| 389 | func (attributes Attributes) PutBoolean(key string, value bool) Attributes { |
| 390 | rawJSON, _ := json.Marshal(value) |
| 391 | attributes[key] = apiext.JSON{ |
| 392 | Raw: rawJSON, |
| 393 | } |
| 394 | return attributes |
| 395 | } |
| 396 | |
| 397 | // FromBooleanMap allows adding into the current map of attributes all |
| 398 | // the attributes contained in the given map of booleans |