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

所謂的“調(diào)試”方法大多數(shù)和開發(fā)環(huá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的同學可能比較好理解,這里某些方法其實和PHP的部分魔術常量功能一致。?CallerDirectory?對應?__DIR__?,?CallerFilePath?對應?__FILE__?,?CallerFunction?對應?__FUNCTION__?。
本文標題:創(chuàng)新互聯(lián)GoFrame教程:GoFrame 功能調(diào)試-gdebug
分享鏈接:http://fisionsoft.com.cn/article/dhhdccp.html


咨詢
建站咨詢
