I'm getting the following error when calling the .FieldByName method of a reflected value, the exact error is :-
panic: reflect: call of reflect.Value.FieldByName on ptr Value
and the code is :-
s := reflect.ValueOf(&value).Elem() (value is a struct)
metric := s.FieldByName(subval.Metric).Interface() (subval.Metric is a string)
I understand this isn't much, but this is all the information I can get.
Here's a link to the code on Go Playground: http://play.golang.org/p/E038cPOoGp