refactor(eventlog) extract Loggable
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com> # TYPES # feat # fix # docs # style (formatting, missing semi colons, etc; no code change): # refactor # test (adding missing tests, refactoring tests; no production code change) # chore (updating grunt tasks etc; no production code change)
Brian Tiger Chow committed
Nov 22, 2014 at 20:04 UTC
08d709d27350ee53f1c8c141112241565d957419
2 files changed
+6
-5
util/eventlog/loggable.go
new
+6
@@ -0,0 +1,6 @@
1
+package eventlog
2
+
3
+// Loggable describes objects that can be marshalled into Metadata for logging
4
+type Loggable interface {
5
+ Loggable() map[string]interface{}
6
+}
util/eventlog/metadata.go
-5
@@ -11,11 +11,6 @@ import (
11
// Metadata is a convenience type for generic maps
12
type Metadata map[string]interface{}
13
14
-// Loggable describes objects that can be marshalled into Metadata for logging
15
-type Loggable interface {
16
- Loggable() map[string]interface{}
17
-}
18
-
14
// Uuid returns a Metadata with the string key and UUID value
15
func Uuid(key string) Metadata {
16
return Metadata{