FromIntegerMap allows adding into the current map of attributes all the attributes contained in the given map of integers
(strings map[string]int)
| 375 | // FromIntegerMap allows adding into the current map of attributes all |
| 376 | // the attributes contained in the given map of integers |
| 377 | func (attributes Attributes) FromIntegerMap(strings map[string]int) Attributes { |
| 378 | for key, value := range strings { |
| 379 | rawJSON, _ := json.Marshal(value) |
| 380 | attributes[key] = apiext.JSON{ |
| 381 | Raw: rawJSON, |
| 382 | } |
| 383 | } |
| 384 | return attributes |
| 385 | } |
| 386 | |
| 387 | // PutBoolean allows adding a boolean attribute to the |
| 388 | // current map of attributes |