mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
make sure to use WithCancel (and be pedantic)
This commit is contained in:
parent
531849df65
commit
1e14eea871
|
|
@ -29,7 +29,8 @@ func _main() int {
|
|||
if envvar := os.Getenv("GOMAXPROCS"); envvar == "" {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
}
|
||||
ctx := context.Background()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
cli := peco.New()
|
||||
if err := cli.Run(ctx); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue