aboutsummaryrefslogtreecommitdiff
path: root/verify/cmd/root.go
diff options
context:
space:
mode:
authoraxtloss <axtlos@getcryst.al>2024-02-28 23:42:26 +0100
committeraxtloss <axtlos@getcryst.al>2024-02-28 23:42:26 +0100
commit3341bd0e945341528033ec6ebaef4f611f654ebe (patch)
treef82d4557ac097d08583e56152352cbd5abd335ea /verify/cmd/root.go
parent91d58f9ae9e9d9adc2e19a0b56d2b9757f6696d6 (diff)
downloadfsverify-3341bd0e945341528033ec6ebaef4f611f654ebe.tar.gz
fsverify-3341bd0e945341528033ec6ebaef4f611f654ebe.tar.bz2
restructure repository layout
Diffstat (limited to 'verify/cmd/root.go')
-rw-r--r--verify/cmd/root.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/verify/cmd/root.go b/verify/cmd/root.go
new file mode 100644
index 0000000..d212e4e
--- /dev/null
+++ b/verify/cmd/root.go
@@ -0,0 +1,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)
+ }
+}