FromBooleanMap allows adding into the current map of attributes all the attributes contained in the given map of booleans
(strings map[string]bool)
| 397 | // FromBooleanMap allows adding into the current map of attributes all |
| 398 | // the attributes contained in the given map of booleans |
| 399 | func (attributes Attributes) FromBooleanMap(strings map[string]bool) Attributes { |
| 400 | for key, value := range strings { |
| 401 | rawJSON, _ := json.Marshal(value) |
| 402 | attributes[key] = apiext.JSON{ |
| 403 | Raw: rawJSON, |
| 404 | } |
| 405 | } |
| 406 | return attributes |
| 407 | } |
| 408 | |
| 409 | // Put allows adding an attribute to the |
| 410 | // current map of attributes. |