package main
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gproc"
)
func main() {
ctx := gctx.GetInitCtx()
g.Log().Debug(ctx, `this is main process`)
if err := gproc.ShellRun(ctx, `go run sub.go`); err != nil {
panic(err)
}
}
1 Comment
aries
github.com/gogf/gf/v2 v2.3.3
复制页面上的例子,为什么我这里主进程和子进程的traceId不一样呀?
main.go
sub.go
输出结果