aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/root.go
blob: e3aa3094801124528ff3d5fa78e05aa0900aa348 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package cmd

import (
	"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
	Use:   "term-clock",
	Short: "A clock on your terminal",
	// Run 'clock' subcommand by default.
	Run: func(cmd *cobra.Command, args []string) {
		clockCmd.Run(cmd, args)
	},
}

func init() {
	rootCmd.AddCommand(alarmCmd)
	rootCmd.AddCommand(clockCmd)
	rootCmd.AddCommand(countdownCmd)
	rootCmd.AddCommand(timerCmd)
}

func Execute() error {
	return rootCmd.Execute()
}