main.go 366 B

1234567891011121314151617181920212223242526
  1. package main
  2. import (
  3. "context"
  4. "fmt"
  5. "os"
  6. "os/signal"
  7. "syscall"
  8. "github.com/jmorganca/ollama/cmd"
  9. "github.com/spf13/cobra"
  10. )
  11. func main() {
  12. sigChan := make(chan os.Signal, 1)
  13. signal.Notify(sigChan, syscall.SIGINT)
  14. go func() {
  15. <-sigChan
  16. fmt.Print("\033[?25h")
  17. os.Exit(0)
  18. }()
  19. cobra.CheckErr(cmd.NewCLI().ExecuteContext(context.Background()))
  20. }