I use a pointer variable at package level:
var config *configuration
But the attempt to unmarshal into the variable results in this error: json: Unmarshal(nil *main.configuration)
. However unmarshaling into an pointer to the pointer variable is successful. What is the reason for this?