MCPcopy
hub / github.com/sirupsen/logrus / getPackage

Function getPackage

alt_exit_test.go:108–113  ·  view source on GitHub ↗

getPackage returns the name of the current package, which makes running this test in a fork simpler

()

Source from the content-addressed store, hash-verified

106// getPackage returns the name of the current package, which makes running this
107// test in a fork simpler
108func getPackage() []byte {
109 pc, _, _, _ := runtime.Caller(0)
110 fullFuncName := runtime.FuncForPC(pc).Name()
111 idx := strings.LastIndex(fullFuncName, ".")
112 return []byte(fullFuncName[:idx]) // trim off function details
113}
114
115var testprogleader = []byte(`
116// Test program for atexit, gets output file and data as arguments and writes

Callers 1

TestHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected