add function TestDataContent for package gdebug

This commit is contained in:
John Guo
2021-08-10 17:20:15 +08:00
parent 232751e3db
commit 00f0a743fc
3 changed files with 19 additions and 6 deletions

View File

@ -28,7 +28,7 @@ func Stack(skip ...int) string {
// StackWithFilter returns a formatted stack trace of the goroutine that calls it.
// It calls runtime.Stack with a large enough buffer to capture the entire trace.
//
// The parameter <filter> is used to filter the path of the caller.
// The parameter `filter` is used to filter the path of the caller.
func StackWithFilter(filter string, skip ...int) string {
return StackWithFilters([]string{filter}, skip...)
}
@ -36,7 +36,7 @@ func StackWithFilter(filter string, skip ...int) string {
// StackWithFilters returns a formatted stack trace of the goroutine that calls it.
// It calls runtime.Stack with a large enough buffer to capture the entire trace.
//
// The parameter <filters> is a slice of strings, which are used to filter the path of the
// The parameter `filters` is a slice of strings, which are used to filter the path of the
// caller.
//
// TODO Improve the performance using debug.Stack.