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: mocking.go
    path of file: ./repos/encore/runtimes/go/et
    
    the code of the file until where you have to start completion: //go:build encore_app

package et

import (
	"fmt"
	"reflect"
)

// MockEndpoint allows you to mock out a
    
func MockService[T any](serviceName string, mock T) {
	if !Singleton.server.ServiceExists(serviceName) {
		panic(fmt.Sprintf("cannot mock service %s: service does not exist", serviceName))
	}

	Singleton.testMgr.SetServiceMock(serviceName, mock)
}