🐛 Program should still halt even with spinner

This commit is contained in:
Dan Jones 2024-10-29 11:28:47 -05:00
commit fd68ffbbf8
3 changed files with 31 additions and 2 deletions

View file

@ -4,12 +4,15 @@ import (
"context"
"codeberg.org/danjones000/utils/chill"
c "codeberg.org/danjones000/utils/cli/context"
e "codeberg.org/danjones000/utils/cli/err"
"codeberg.org/danjones000/utils/cli/spin"
)
func main() {
ctx := chill.Chill(context.Background())
ctx, done := c.SelfCancelingCotext(context.Background())
defer done()
ctx = chill.Chill(ctx)
s := spin.Spin(ctx, "Waiting for CPU to cool...")
err := s.Wait()
e.HandleErr(err)