Re:Map[string]interface{} in Go: a user's manual
by TJSomething on Monday July 26, 2021 @04:08PM
(#27964727)
You could have a JSON value interface with methods like getType and getAsString, which would remove the overhead and type safety issues of reflection.
Also, if you're making a set, use `map[string]struct{}` instead of `map[string]interface{}` as `struct{}` takes 0 bytes whereas `interface{}` takes 8.