From be1543376759292197342ef56b2e0e6e3af81185 Mon Sep 17 00:00:00 2001 From: dadav <33197631+dadav@users.noreply.github.com> Date: Thu, 29 Feb 2024 22:49:27 +0100 Subject: [PATCH] feat: Add more code --- README.md | 16 ++++++++++++---- cmd/root.go | 21 ++------------------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index bfd7b8a..a6446dc 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,23 @@ -# ⭐Gorge +# ⭐ Gorge Gorge is a go implementation for [forgeapi.puppet.com](https://forgeapi.puppet.com/). -## 💎Usage +## 🌹 Installation + +Via `go install`: + +```bash +go install github.com/dadav/gorge@latest +``` + +## 💎 Usage dummy -## 🍰Configuration +## 🍰 Configuration dummy -## 🔑License +## 🔑 License [Apache](./LICENSE) diff --git a/cmd/root.go b/cmd/root.go index 77dc478..73ac20e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -30,16 +30,8 @@ var cfgFile string // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ Use: "gorge", - Short: "A brief description of your application", - Long: `A longer description that spans multiple lines and likely contains -examples and usage of using your application. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, - // Uncomment the following line if your bare application - // has an action associated with it: - // Run: func(cmd *cobra.Command, args []string) { }, + Short: "Gorge runs a puppet forge server", + Long: `You can run this tool to provide access to your puppet modules.`, } // Execute adds all child commands to the root command and sets flags appropriately. @@ -53,16 +45,7 @@ func Execute() { func init() { cobra.OnInitialize(initConfig) - - // Here you will define your flags and configuration settings. - // Cobra supports persistent flags, which, if defined here, - // will be global for your application. - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.gorge.yaml)") - - // Cobra also supports local flags, which will only run - // when this action is called directly. - rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") } // initConfig reads in config file and ENV variables if set.