Last active
March 25, 2017 21:58
-
-
Save maplebed/c9fe2908d91eba4ed4c8ae541e72e409 to your computer and use it in GitHub Desktop.
Output from logfmt lib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ go run main.go | |
0: `foo=bar` // correct | |
(map[string]interface {}) (len=1) { | |
(string) (len=3) "foo": (string) (len=3) "bar" | |
} | |
1: `foo=bar baz=3 fl=3.1415926535 bl=true` // correct | |
(map[string]interface {}) (len=4) { | |
(string) (len=2) "bl": (bool) true, | |
(string) (len=3) "foo": (string) (len=3) "bar", | |
(string) (len=3) "baz": (int) 3, | |
(string) (len=2) "fl": (float64) 3.1415926535 | |
} | |
2: `foo=bar ben=one two baz=3` // failed - `two` became its own key | |
(map[string]interface {}) (len=4) { | |
(string) (len=3) "baz": (int) 3, | |
(string) (len=3) "foo": (string) (len=3) "bar", | |
(string) (len=3) "ben": (string) (len=3) "one", | |
(string) (len=3) "two": (string) "" | |
} | |
3: `foo=bar eq="a test with = signs" baz=3` // correct | |
(map[string]interface {}) (len=3) { | |
(string) (len=3) "foo": (string) (len=3) "bar", | |
(string) (len=2) "eq": (string) (len=19) "a test with = signs", | |
(string) (len=3) "baz": (int) 3 | |
} | |
4: `foo=bar unq=astr=with=equals?and*stuff baz=3` // failed - `with` became its own key | |
(map[string]interface {}) (len=4) { | |
(string) (len=3) "foo": (string) (len=3) "bar", | |
(string) (len=3) "unq": (string) (len=4) "astr", | |
(string) (len=4) "with": (string) (len=16) "equals?and*stuff", | |
(string) (len=3) "baz": (int) 3 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment