From 86906c67692df805016e58874970ec03893d774b Mon Sep 17 00:00:00 2001 From: Sam Coe Date: Wed, 4 Nov 2020 12:40:40 +0300 Subject: [PATCH] Small cleanup --- internal/docs/markdown.go | 4 ++-- pkg/cmd/root/help_topic.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/docs/markdown.go b/internal/docs/markdown.go index f9b8faeb9..3432e9784 100644 --- a/internal/docs/markdown.go +++ b/internal/docs/markdown.go @@ -93,8 +93,8 @@ func GenMarkdownTreeCustom(cmd *cobra.Command, dir string, filePrepender, linkHa } basename := strings.Replace(cmd.CommandPath(), " ", "_", -1) + ".md" - if override, ok := cmd.Annotations["markdown:basename"]; ok { - basename = override + ".md" + if basenameOverride, found := cmd.Annotations["markdown:basename"]; found { + basename = basenameOverride + ".md" } filename := filepath.Join(dir, basename) diff --git a/pkg/cmd/root/help_topic.go b/pkg/cmd/root/help_topic.go index 95618f5c8..cffd452b9 100644 --- a/pkg/cmd/root/help_topic.go +++ b/pkg/cmd/root/help_topic.go @@ -7,7 +7,7 @@ import ( var HelpTopics = map[string]map[string]string{ "environment": { - "short": "Environmental variables that can be used with gh", + "short": "Environment variables that can be used with gh", "long": heredoc.Doc(` GITHUB_TOKEN: an authentication token for github.com API requests. Setting this avoids being prompted to authenticate and takes precedence over previously stored credentials.