handled another error condition

master
Charles Iliya Krempeaux 2019-07-10 21:31:34 -07:00
parent 5a1e556549
commit cd58524dc0
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ func (pattern *Pattern) FindAndLoad(path string, strct interface{}) (bool, error
} }
reflectedValueElem := reflectedValue.Elem() reflectedValueElem := reflectedValue.Elem()
if reflect.Struct != reflectedValueElem.Kind() {
return doesNotMatter, errExpectedAPointerToAStruct
}
reflectedValueElemType := reflectedValueElem.Type() reflectedValueElemType := reflectedValueElem.Type()