mirror of
https://github.com/mainnika/mongox-go-driver.git
synced 2026-07-03 17:22:33 +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++ {
|
for i := 0; i < numField; i++ {
|
||||||
field := el.Field(i)
|
field := el.Field(i)
|
||||||
|
if !field.CanInterface() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
switch field.Interface().(type) {
|
switch field.Interface().(type) {
|
||||||
case *protection.Key:
|
case *protection.Key:
|
||||||
|
|||||||
Reference in New Issue
Block a user