PutInteger allows adding an integer attribute to the current map of attributes
(key string, value int)
| 365 | // PutInteger allows adding an integer attribute to the |
| 366 | // current map of attributes |
| 367 | func (attributes Attributes) PutInteger(key string, value int) Attributes { |
| 368 | rawJSON, _ := json.Marshal(value) |
| 369 | attributes[key] = apiext.JSON{ |
| 370 | Raw: rawJSON, |
| 371 | } |
| 372 | return attributes |
| 373 | } |
| 374 | |
| 375 | // FromIntegerMap allows adding into the current map of attributes all |
| 376 | // the attributes contained in the given map of integers |