From 1c9b529fa58495ad91ef687f3c689ed56de7a2b1 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Thu, 5 Sep 2024 08:40:15 +0200 Subject: [PATCH] fix linter issues Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- config/option.go | 2 +- config/validation.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)) } } }