From 17fb6add26291b31f7020e3551a7c8487130a747 Mon Sep 17 00:00:00 2001 From: "F.O." Date: Sun, 16 Feb 2025 17:56:08 +0100 Subject: genesi --- cmd/root.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cmd/root.go (limited to 'cmd/root.go') diff --git a/cmd/root.go b/cmd/root.go new file mode 100644 index 0000000..321253c --- /dev/null +++ b/cmd/root.go @@ -0,0 +1,36 @@ +/* +Copyright © 2025 Francesco Orlando scrotadamus@insiberia.net +*/ +package cmd + +import ( + "os" + + "github.com/scrotadamus/ghligh/cmd/tag" + "github.com/spf13/cobra" +) + +var rootCmd = &cobra.Command{ + Use: "ghligh", + Short: "pdf highlights swiss knife", + Long: `ghligh can be used to manipulate pdf files in various ways.`, + + Run: func(cmd *cobra.Command, args []string) { + cmd.Help() + return + }, +} + +// Execute adds all child commands to the root command and sets flags appropriately. +// This is called by main.main(). It only needs to happen once to the rootCmd. +func Execute() { + err := rootCmd.Execute() + if err != nil { + os.Exit(1) + } +} + +func init() { + //rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") + rootCmd.AddCommand(tag.TagCmd) +} -- cgit v1.2.3