From db5a476d5c77dbeba45b2007fe7a9049885a7810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20St=C3=B6lzle?= Date: Sun, 19 Mar 2023 16:23:26 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20flags=20(#41)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/root.go | 11 ++++++++--- readme.md | 8 ++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 6f14561..92712c3 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -102,8 +102,10 @@ func Execute() { func init() { cobra.OnInitialize(initConfig) - RootCmd.PersistentFlags().BoolVar(&noCache, "no-cache", false, "Do not cache results for one hour (default: false)") - RootCmd.PersistentFlags().BoolVar(&silent, "silent", false, "Do not print any output (default: false)") + RootCmd.PersistentFlags().BoolVar(&noCache, "no-cache", false, + `Do not cache results for one hour (default "false")`, + ) + RootCmd.PersistentFlags().BoolVar(&silent, "silent", false, `Do not print any output (default: "false")`) RootCmd.PersistentFlags().StringVarP( &enterprise, "enterprise", "e", "", @@ -128,7 +130,10 @@ func init() { ), ) - RootCmd.PersistentFlags().StringVarP(&token, "token", "t", "", "GitHub Personal Access Token (default: gh auth token)") + RootCmd.PersistentFlags().StringVarP( + &token, "token", "t", "", + `GitHub Personal Access Token (default "gh auth token")`, + ) RootCmd.PersistentFlags().StringVar(&hostname, "hostname", "github.com", "GitHub Enterprise Server hostname") RootCmd.PersistentFlags().StringVar(&csvPath, "csv", "", "Path to CSV file") diff --git a/readme.md b/readme.md index b55ac87..99eadaa 100644 --- a/readme.md +++ b/readme.md @@ -35,13 +35,13 @@ Flags: --csv string Path to CSV file -e, --enterprise string GitHub Enterprise Cloud account (requires read:enterprise scope) -h, --help help for gh-report - --hostname string GitHub Enterprise Server hostname + --hostname string GitHub Enterprise Server hostname (default "github.com") --json string Path to JSON file - --no-cache Do not cache results for one hour (default: false) + --no-cache Do not cache results for one hour (default "false") -o, --owner string GitHub account organization (requires read:org scope) or user account (requires n/a scope) -r, --repo string GitHub repository (owner/repo), requires repo scope - --silent Do not print any output (default: false) - -t, --token string GitHub Personal Access Token (default: gh auth token) + --silent Do not print any output (default: "false") + -t, --token string GitHub Personal Access Token (default "gh auth token") -v, --version version for gh-report Use "gh-report [command] --help" for more information about a command.