Skip to content

v0.4.4: mock: add ParseTags() and SerializeTags() helper functions

Compare
Choose a tag to compare
@charlievieth charlievieth released this 19 Aug 00:42
· 40 commits to master since this release
ba314c9

v0.4.4

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)