Do not find through unexported values

This commit is contained in:
Nikita Tokarchuk
2020-03-14 19:34:37 +01:00
parent e7a05d94e1
commit e0c26f770f
+3
View File
@@ -19,6 +19,9 @@ func GetProtection(source interface{}) *protection.Key {
for i := 0; i < numField; i++ {
field := el.Field(i)
if !field.CanInterface() {
continue
}
switch field.Interface().(type) {
case *protection.Key: