diff options
author | axtloss <axtlos@getcryst.al> | 2024-02-04 13:35:03 +0100 |
---|---|---|
committer | axtloss <axtlos@getcryst.al> | 2024-02-04 13:35:03 +0100 |
commit | 71cc54810fdb51e428b83a37ff89d54a6cc3d8c8 (patch) | |
tree | 04d13d72b6afedaaa06478d9d86fb74a62534f88 /verifysetup | |
parent | 09f7f5fe7b55a6ab2e2326aa7ff27cf7f7bc05ba (diff) | |
download | fsverify-71cc54810fdb51e428b83a37ff89d54a6cc3d8c8.tar.gz fsverify-71cc54810fdb51e428b83a37ff89d54a6cc3d8c8.tar.bz2 |
add minisign signature verification
Diffstat (limited to 'verifysetup')
-rw-r--r-- | verifysetup/cmd/root.go | 22 | ||||
-rw-r--r-- | verifysetup/cmd/setup.go | 20 | ||||
-rw-r--r-- | verifysetup/go.mod | 3 |
3 files changed, 45 insertions, 0 deletions
diff --git a/verifysetup/cmd/root.go b/verifysetup/cmd/root.go new file mode 100644 index 0000000..edcb250 --- /dev/null +++ b/verifysetup/cmd/root.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/spf13/cobra" + "os" +) + +var rootCmd = &cobra.Command{ + Use: "verifysetup", +} + +func init() { + rootCmd.AddCommand(NewSetupCommand()) +} + +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) + } +} diff --git a/verifysetup/cmd/setup.go b/verifysetup/cmd/setup.go new file mode 100644 index 0000000..3897903 --- /dev/null +++ b/verifysetup/cmd/setup.go @@ -0,0 +1,20 @@ +package cmd + +import ( + "github.com/spf13/cobra" +) + +func NewVerifyCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "setup", + Short: "Set up fsverify", + RunE: SetupCommand, + SilenceUsage: true, + } + + return cmd +} + +func SetupCommand(_ *cobra.Command, args []string) error { + return nil +} diff --git a/verifysetup/go.mod b/verifysetup/go.mod new file mode 100644 index 0000000..25642c6 --- /dev/null +++ b/verifysetup/go.mod @@ -0,0 +1,3 @@ +module github.com/axtloss/fsverify/verifysetup + +go 1.21.6 |