Skip to content

Instantly share code, notes, and snippets.

View pallat's full-sized avatar

Pallat Anchaleechamaikorn pallat

View GitHub Profile
@alexisvisco
alexisvisco / logfmt.go
Created August 17, 2019 14:58
logfmt parser in go that return map[string]string
func ParseLogfmt(msg string) map[string]string {
type kv struct {
key, val string
}
var pair *kv = nil
pairs := make(map[string]string)
buf := bytes.NewBuffer([]byte{})