You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: main.go
    path of file: ./repos/watermill/_examples/real-world-examples/sending-webhooks/router
    
    the code of the file until where you have to start completion: package main

import (
	"context"

	"github.com/ThreeDotsLabs/watermill"
	watermill_http "github.com/ThreeDotsLabs/watermill-http/pkg/http"
	"github.com/ThreeDotsLabs/watermill-kafka/v2/pkg/kafka"
	"github.com/ThreeDotsLabs/watermill/message"
	"github.com/ThreeDotsLabs/watermill/message/router/plugin"
)

var (
	logger = watermill.NewStdLogger(false, false)
)

// filterMessages passes the message along if its event type is one 
    
func filterMessages(acceptedTypes ...string) message.HandlerFunc {
	return func(msg *message.Message) ([]*message.Message, error) {
		// the kafka producer sets this metadata so that we don't have to unmarshal the body
		// just sort the messages based on event type metadata
		msgEventType := msg.Metadata.Get("event_type")

		for _, typ := range acceptedTypes {
			if typ == msgEventType {
				return message.Messages{msg}, nil
			}
		}

		return nil, nil
	}
}