Skip to content

Commit

Permalink
fix DefaultDestinationMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
hariso committed Nov 20, 2024
1 parent b07a4b5 commit abdb4b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion destination_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ type DefaultDestinationMiddleware struct {

// Validate validates all the [Validatable] structs in the middleware.
func (c *DefaultDestinationMiddleware) Validate(ctx context.Context) error {
val := reflect.ValueOf(c)
// c is a pointer, we need the value to which the pointer points to
// (so we can enumerate the fields below)
val := reflect.ValueOf(c).Elem()
valType := val.Type()
validatableInterface := reflect.TypeOf((*Validatable)(nil)).Elem()

Expand Down

0 comments on commit abdb4b7

Please sign in to comment.