entc/gen: add redundant any() to withHooks to make linters work (#3360)

See https://github.com/golang/go/issues/58633 for more info.
This commit is contained in:
Anton Telyshev
2023-03-12 11:47:07 +02:00
committed by GitHub
parent bbbedf53af
commit 148f7d51a0
38 changed files with 40 additions and 38 deletions

View File

@@ -513,7 +513,7 @@ func withHooks[V Value, M any, PM interface {
return exec(ctx)
}
var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
mutationT, ok := m.(PM)
mutationT, ok := any(m).(PM)
if !ok {
return nil, fmt.Errorf("unexpected mutation type %T", m)
}