Add nil guard for binding

This commit is contained in:
Lea Anthony 2021-01-31 21:10:30 +11:00
commit e6b40b55c4
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405

View file

@ -25,6 +25,9 @@ func NewBindings(logger *logger.Logger, structPointersToBind []interface{}, exem
}
for _, exemption := range exemptions {
if exemptions == nil {
continue
}
name := runtime.FuncForPC(reflect.ValueOf(exemption).Pointer()).Name()
// Yuk yuk yuk! Is there a better way?
name = strings.TrimSuffix(name, "-fm")