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: progress_reporter_manager.go
    path of file: ./repos/kubernetes/vendor/github.com/onsi/ginkgo/v2/internal
    
    the code of the file until where you have to start completion: package internal

import (
	"context"
	"sort"
	"strings"
	"sync"

	"github.com/onsi/ginkgo/v2/types"
)

type ProgressReporterManager struct {
	lock              *sync.Mutex
	progressReporters map[int]func() string
	prCounter    
    
func (prm *ProgressReporterManager) AttachProgressReporter(reporter func() string) func() {
	prm.lock.Lock()
	defer prm.lock.Unlock()
	prm.prCounter += 1
	prCounter := prm.prCounter
	prm.progressReporters[prCounter] = reporter

	return func() {
		prm.lock.Lock()
		defer prm.lock.Unlock()
		delete(prm.progressReporters, prCounter)
	}
}