address feedback
This commit is contained in:
parent
b77bb9e4aa
commit
98c888a630
@ -65,7 +65,7 @@ func permissionedAny(in interface{}, out interface{}) {
|
|||||||
field := rint.Type().Field(f)
|
field := rint.Type().Field(f)
|
||||||
requiredPerm := Permission(field.Tag.Get("perm"))
|
requiredPerm := Permission(field.Tag.Get("perm"))
|
||||||
if requiredPerm == "" {
|
if requiredPerm == "" {
|
||||||
panic("missing 'perm' tag on " + field.Name) // is this okay? can this be used to crash the process?
|
panic("missing 'perm' tag on " + field.Name) // ok
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate perm tag
|
// Validate perm tag
|
||||||
@ -77,7 +77,7 @@ func permissionedAny(in interface{}, out interface{}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !ok {
|
if !ok {
|
||||||
panic("unknown 'perm' tag on " + field.Name) // is this okay? can this be used to crash the process?
|
panic("unknown 'perm' tag on " + field.Name) // ok
|
||||||
}
|
}
|
||||||
|
|
||||||
fn := ra.MethodByName(field.Name)
|
fn := ra.MethodByName(field.Name)
|
||||||
|
@ -56,6 +56,7 @@ func (s *Signature) TypeCode() int {
|
|||||||
case KTBLS:
|
case KTBLS:
|
||||||
return IKTBLS
|
return IKTBLS
|
||||||
default:
|
default:
|
||||||
|
log.Errorf("called TypeCode on signature with unknown Type: %q", s.Type)
|
||||||
return IKTUnknown
|
return IKTUnknown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user