dae/cmd/honk.go

35 lines
625 B
Go
Raw Normal View History

2023-08-19 11:02:49 +07:00
/*
* SPDX-License-Identifier: AGPL-3.0-only
* Copyright (c) 2022-2024, daeuniverse Organization <dae@v2raya.org>
2023-08-19 11:02:49 +07:00
*/
2023-08-20 00:55:42 +07:00
package cmd
2023-08-19 11:02:49 +07:00
2023-08-20 00:55:42 +07:00
import (
"fmt"
"os"
2023-08-20 12:33:56 +07:00
"time"
2023-08-20 00:55:42 +07:00
"github.com/spf13/cobra"
)
var (
honkCmd = &cobra.Command{
Use: "honk",
Short: "Let dae call for you.",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Honk! Honk! Honk! This is dae!")
2023-08-20 12:33:56 +07:00
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")
2023-08-20 00:55:42 +07:00
os.Exit(0)
},
}
)
func init() {
rootCmd.AddCommand(honkCmd)
}