Package runtime https://golang.org/pkg/runtime/ Table of Contents Get the name of a function as a string Get the name of a function as a string howto func GetFunctionName(i interface{}) string { fp := reflect.ValueOf(i).Pointer() return runtime.FuncForPC(fp).Name() } https://stackoverflow.com/questions/7052693/how-to-get-the-name-of-a-function-in-go