新聞中心
這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
創(chuàng)新互聯(lián)GoFrame教程:GoFrame 功能調(diào)試-gdebug
?GOframe?框架提供了豐富的調(diào)試功能,由?gdebug?組件實(shí)現(xiàn)。

所謂的“調(diào)試”方法大多數(shù)和開發(fā)環(huán)境有一定關(guān)系,包含堆棧和調(diào)用鏈信息分析,并且性能往往不是特別高。
使用方式:
import "github.com/gogf/gf/v2/debug/gdebug"接口文檔:
https://pkg.go.dev/github.com/gogf/gf/v2/debug/gdebug
方法列表:
func BinVersion() string
func BinVersionMd5() string
func Caller(skip ...int) (function string, path string, line int)
func CallerDirectory() string
func CallerFileLine() string
func CallerFileLineShort() string
func CallerFilePath() string
func CallerFunction() string
func CallerPackage() string
func CallerWithFilter(filter string, skip ...int) (function string, path string, line int)
func FuncName(f interface{}) string
func FuncPath(f interface{}) string
func GoroutineId() int
func PrintStack(skip ...int)
func Stack(skip ...int) string
func StackWithFilter(filter string, skip ...int) string
func StackWithFilters(filters []string, skip ...int) string
func TestDataPath(names ...string) string熟悉PHP的同學(xué)可能比較好理解,這里某些方法其實(shí)和PHP的部分魔術(shù)常量功能一致。?CallerDirectory?對(duì)應(yīng)?__DIR__?,?CallerFilePath?對(duì)應(yīng)?__FILE__?,?CallerFunction?對(duì)應(yīng)?__FUNCTION__?。
網(wǎng)頁(yè)題目:創(chuàng)新互聯(lián)GoFrame教程:GoFrame 功能調(diào)試-gdebug
文章來(lái)源:http://www.5511xx.com/article/dhhdccp.html


咨詢
建站咨詢
