address feedback

This commit is contained in:
whyrusleeping 2019-11-17 11:00:45 -06:00
parent b77bb9e4aa
commit 98c888a630
2 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,7 @@ func permissionedAny(in interface{}, out interface{}) {
field := rint.Type().Field(f)
requiredPerm := Permission(field.Tag.Get("perm"))
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
@ -77,7 +77,7 @@ func permissionedAny(in interface{}, out interface{}) {
}
}
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)

View File

@ -56,6 +56,7 @@ func (s *Signature) TypeCode() int {
case KTBLS:
return IKTBLS
default:
log.Errorf("called TypeCode on signature with unknown Type: %q", s.Type)
return IKTUnknown
}
}