2024-01-22 21:52:54 +08:00
|
|
|
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
|
|
|
|
//
|
|
|
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
|
|
|
// If a copy of the MIT was not distributed with this file,
|
|
|
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
|
|
2022-06-21 21:46:12 +08:00
|
|
|
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() {
|
2023-04-12 10:35:24 +08:00
|
|
|
ctx := gctx.GetInitCtx()
|
2022-06-21 21:46:12 +08:00
|
|
|
g.Log().Debug(ctx, `this is main process`)
|
|
|
|
|
if err := gproc.ShellRun(ctx, `go run sub/sub.go`); err != nil {
|
|
|
|
|
panic(err)
|
|
|
|
|
}
|
|
|
|
|
}
|