v0.4.4: mock: add ParseTags() and SerializeTags() helper functions
v0.4.4
- #103: tags: move tags logic to internal pkg and add
ParseTags()
andSerializeTags()
helpers
Example of usage of SerializeTags()
:
tags := map[string]string{
"key_1": "val_1",
"key_2": "val_2",
}
counter := store.NewCounterWithTags("counter", tags)
counter.Add(2)
store.Flush()
n := sink.Counter(mock.SerializeTags("counter", tags))
fmt.Println("counter:", n, n == 2)