File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,13 +198,14 @@ func (md *MetaData) unify(data interface{}, rv reflect.Value) error {
198198 return nil
199199 }
200200
201+ rvi := rv .Interface ()
201202 // Special case. Unmarshaler Interface support.
202- if v , ok := rv . Interface () .(Unmarshaler ); ok {
203+ if v , ok := rvi .(Unmarshaler ); ok {
203204 return v .UnmarshalTOML (data )
204205 }
205206
206207 // Special case. Look for a value satisfying the TextUnmarshaler interface.
207- if v , ok := rv . Interface () .(encoding.TextUnmarshaler ); ok {
208+ if v , ok := rvi .(encoding.TextUnmarshaler ); ok {
208209 return md .unifyText (data , v )
209210 }
210211 // TODO:
@@ -224,7 +225,7 @@ func (md *MetaData) unify(data interface{}, rv reflect.Value) error {
224225 switch k {
225226 case reflect .Ptr :
226227 elem := reflect .New (rv .Type ().Elem ())
227- err := md .unify (data , indirect (elem ))
228+ err := md .unify (data , reflect . Indirect (elem ))
228229 if err != nil {
229230 return err
230231 }
You can’t perform that action at this time.
0 commit comments