mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
26 lines
464 B
Go
26 lines
464 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/os/gcmd"
|
|
"github.com/gogf/gf/v2/os/gctx"
|
|
"github.com/gogf/gf/v2/os/gproc"
|
|
)
|
|
|
|
var (
|
|
Main = &gcmd.Command{
|
|
Name: "main",
|
|
Brief: "main process",
|
|
Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
|
|
g.Log().Debug(ctx, `this is main process`)
|
|
return gproc.ShellRun(ctx, `go run sub/sub.go`)
|
|
},
|
|
}
|
|
)
|
|
|
|
func main() {
|
|
Main.Run(gctx.GetInitCtx())
|
|
}
|