File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,13 @@ func NewCommand() (cmd *cobra.Command) {
3232 RunEvent ()
3333 var nodeCtx context.Context
3434 var err error
35- if nodeCtx , err = RunNode (context .Background ()); err != nil {
35+ ctx := context .Background ()
36+ if nodeCtx , err = RunNode (ctx ); err != nil {
3637 fmt .Println (err .Error ())
3738 os .Exit (1 )
3839 }
3940 event .Event (event2 .NewInfoNode ("Run node success" ))
40- if err = RunConsole (context . Background () ); err != nil {
41+ if err = RunConsole (ctx ); err != nil {
4142 fmt .Println (err .Error ())
4243 os .Exit (1 )
4344 }
Original file line number Diff line number Diff line change 77)
88
99// RunConsole run gin
10- func RunConsole () (err error ) {
11- err = console .Run (context . Background () )
10+ func RunConsole (c context. Context ) (err error ) {
11+ err = console .Run (c )
1212 return
1313}
You can’t perform that action at this time.
0 commit comments