Golang: Type [type] is not an expression; json config parsing

Solution 1:

What you're doing there is trying to pass a pointer to the ConfigVars type (which obviously doesn't really mean anything). What you want to do is make a variable whose type is ConfigVars and pass a pointer to that instead:

var cfg ConfigVars
err = jsonParser.Decode(&cfg)
...