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: path_filter_test.go
    path of file: ./repos/octant/internal/describer
    
    the code of the file until where you have to start completion: package describer

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestPathFilter_Match(t *testing.T) {
	tests := []struct {
		name        string
		filterPath  string
		contentPath string
		isMatch     bool
	}{
		{
			name:        "case 1",
			filterPath:  "/foo/bar",
			contentPath: "/foo/bar",
			isMatch:     true,
		},
		{
			name:        "case 2",
			filterPath:  "/foo/bar",
			contentPath: "/namespace/default/foo/bar",
			isMatch:     true,
		},
		{
			name:        "case 3",
			filterPath:  "/",
			contentPath: "/namespace/default",
			isMatch:     true,
		},
		{
			name:        "case 4",
			filterPath:  "/workloads/cron-jobs/(?P<name>^[^.]+)",
			contentPath: "/workloads/cron-jobs",
			isMatch:     false,
		},
		{
			name:        "case 5",
			filterPath:  "/
    
func TestPathFilter_Fields(t *testing.T) {
	tests := []struct {
		name        string
		filterPath  string
		contentPath string
		expected    map[string]string
	}{
		{
			name:        "path",
			filterPath:  `/workloads/cron-jobs/(?P<name>.*?)`,
			contentPath: "/workloads/cron-jobs/name",
			expected: map[string]string{
				"name":      "name",
				"namespace": "",
			},
		},
		{
			name:        "path with namespace",
			filterPath:  `/workloads/cron-jobs/(?P<name>.*?)`,
			contentPath: "/namespace/default/workloads/cron-jobs/name",
			expected: map[string]string{
				"name":      "name",
				"namespace": "default",
			},
		},
	}

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			pf := NewPathFilter(test.filterPath, nil)
			got := pf.Fields(test.contentPath)

			assert.Equal(t, test.expected, got)
		})
	}
}