mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-05-10 13:05:18 +08:00
refactor: 注释优化
This commit is contained in:
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
// StackStr 获取指定堆栈描述信息
|
||||
//
|
||||
// @param skip: 跳过堆栈个数
|
||||
// @param nFrames: 需要描述的堆栈个数
|
||||
// - skip: 跳过堆栈个数
|
||||
// - nFrames: 需要描述的堆栈个数
|
||||
func StackStr(skip, nFrames int) string {
|
||||
pcs := make([]uintptr, nFrames+1)
|
||||
n := runtime.Callers(skip+1, pcs)
|
||||
|
||||
@@ -16,8 +16,8 @@ func parse(t *template.Template, vars any) (string, error) {
|
||||
}
|
||||
|
||||
// 模板字符串解析
|
||||
// @param str 模板字符串
|
||||
// @param vars 参数变量
|
||||
// - str 模板字符串
|
||||
// - vars 参数变量
|
||||
func TemplateParse(str string, vars any) (string, error) {
|
||||
tmpl, err := template.New("tmpl").Parse(str)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user