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: matcher_test.go
    path of file: ./repos/traefik/pkg/muxer/http
    
    the code of the file until where you have to start completion: package http

import (
	"net/http"
	"net/http/httptest"
	"strings"
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	"github.com/traefik/traefik/v3/pkg/middlewares/requestdecorator"
)

func TestClientIPMatcher(t *testing.T) {
	testCases := []struct {
		desc          string
		rule          string
		expected      map[string]int
		expectedError bool
	}{
		{
			desc:          "invalid ClientIP matcher",
			rule:          "ClientIP(`1`)",
			expectedError: true,
		},
		{
			desc:          "invalid ClientIP matcher (no parameter)",
			rule:          "ClientIP()",
			expectedError: true,
		},
		{
			desc:          "invalid ClientIP matcher (empty parameter)",
			rule:          "ClientIP(``)",
			expectedError: true,
		},
		{
			desc:          "invalid ClientIP matcher (too many parameters)",
			rule:          "ClientIP(`127.0.0.1`, `192.168.1.0/24`)",
			expectedError: true,
		},
		{
			desc: "valid ClientIP matcher",
			rule: "ClientIP(`127.0.0.1`)",
			expected: map[string]int{
				"127.0.0.1":   http.StatusOK,
				"192.168.1.1": http.StatusNotFound,
			},
		},
		{
			desc: "valid ClientIP matcher but invalid remote address",
			rule: "ClientIP(`127.0.0.1`)",
			expected: map[string]int{
				"1": http.StatusNotFound,
			},
		},
		{
			desc: "vali
    
func TestClientIPMatcher(t *testing.T) {
	testCases := []struct {
		desc          string
		rule          string
		expected      map[string]int
		expectedError bool
	}{
		{
			desc:          "invalid ClientIP matcher",
			rule:          "ClientIP(`1`)",
			expectedError: true,
		},
		{
			desc:          "invalid ClientIP matcher (no parameter)",
			rule:          "ClientIP()",
			expectedError: true,
		},
		{
			desc:          "invalid ClientIP matcher (empty parameter)",
			rule:          "ClientIP(``)",
			expectedError: true,
		},
		{
			desc:          "invalid ClientIP matcher (too many parameters)",
			rule:          "ClientIP(`127.0.0.1`, `192.168.1.0/24`)",
			expectedError: true,
		},
		{
			desc: "valid ClientIP matcher",
			rule: "ClientIP(`127.0.0.1`)",
			expected: map[string]int{
				"127.0.0.1":   http.StatusOK,
				"192.168.1.1": http.StatusNotFound,
			},
		},
		{
			desc: "valid ClientIP matcher but invalid remote address",
			rule: "ClientIP(`127.0.0.1`)",
			expected: map[string]int{
				"1": http.StatusNotFound,
			},
		},
		{
			desc: "valid ClientIP matcher using CIDR",
			rule: "ClientIP(`192.168.1.0/24`)",
			expected: map[string]int{
				"192.168.1.1":   http.StatusOK,
				"192.168.1.100": http.StatusOK,
				"192.168.2.1":   http.StatusNotFound,
			},
		},
	}

	for _, test := range testCases {
		test := test
		t.Run(test.desc, func(t *testing.T) {
			t.Parallel()

			handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
			muxer, err := NewMuxer()
			require.NoError(t, err)

			err = muxer.AddRoute(test.rule, "", 0, handler)
			if test.expectedError {
				require.Error(t, err)
				return
			}

			require.NoError(t, err)

			results := make(map[string]int)
			for remoteAddr := range test.expected {
				w := httptest.NewRecorder()

				req := httptest.NewRequest(http.MethodGet, "https://example.com", http.NoBody)
				req.RemoteAddr = remoteAddr

				muxer.ServeHTTP(w, req)
				results[remoteAddr] = w.Code
			}
			assert.Equal(t, test.expected, results)
		})
	}
}