diff --git a/config/option.go b/config/option.go index 0118bf3..414bc86 100644 --- a/config/option.go +++ b/config/option.go @@ -118,7 +118,7 @@ type OptionTransformer struct{} func (t OptionTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { if typ.Kind() != reflect.Ptr { - typ = reflect.PtrTo(typ) + typ = reflect.PointerTo(typ) } if _, ok := typ.MethodByName("IsSome"); !ok { return nil diff --git a/config/validation.go b/config/validation.go index bf6925b..f7729bd 100644 --- a/config/validation.go +++ b/config/validation.go @@ -44,7 +44,7 @@ func (v *Validator) Validate(ctx context.Context, config Config) error { switch val := v.(type) { // Policies that only return a single string (e.g. deny[msg]) case string: - resErr = errors.Join(resErr, fmt.Errorf(val)) + resErr = errors.Join(resErr, errors.New(val)) } } }