mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-05-22 15:53:36 +00:00
Do not find through unexported values
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user