chore: honk with sound (#289)

This commit is contained in:
Nicolas 2023-08-20 13:33:56 +08:00 committed by GitHub
parent 7273be6a06
commit 5c9e0cfa15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@ package cmd
import (
"fmt"
"os"
"time"
"github.com/spf13/cobra"
)
@ -18,6 +19,11 @@ var (
Short: "Let dae call for you.",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Honk! Honk! Honk! This is dae!")
fmt.Println("\a\a\a\x1b[1A")
time.Sleep(3 * 100 * time.Millisecond)
fmt.Println("\a\a\a\x1b[1A")
time.Sleep(3 * 100 * time.Millisecond)
fmt.Println("\a\a\a\x1b[1A")
os.Exit(0)
},
}
@ -25,4 +31,4 @@ var (
func init() {
rootCmd.AddCommand(honkCmd)
}
}