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

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

var rootCmd = &cobra.Command{
	Use: "fsverify",
}

func init() {
	rootCmd.AddCommand(NewVerifyCommand())
}

func Execute() {
	// cobra does not exit with a non-zero return code when failing
	// solution from https://github.com/spf13/cobra/issues/221
	if err := rootCmd.Execute(); err != nil {
		os.Exit(1)
	}
}