|
Admittedly I'm not a huge fan of having: slog.Info("hello, world", "user", os.Getenv("USER"))
It's a little magical that "user" is a key. So what if you have multiple key-value pairs? Arguably it most likely going to be obvious which is the keys, but having every other value be a key and the rest values seems a little clumsy.I really like Pythons approach where you can have user="value" it makes things a bit more clear. |
[1] https://github.com/uber-go/zap