From 8514255f7cd692958ea55ed9a6f386d3289e61e8 Mon Sep 17 00:00:00 2001 From: Pantelis Karamolegkos Date: Tue, 20 Jun 2023 21:51:40 +0300 Subject: [PATCH] chore: function docs, linting errors (#3380) * Function documentation and linting errors --------- Co-authored-by: Pantelis Karamolegkos Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com> --- cmd/help_fmt.go | 2 ++ cmd/version.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/help_fmt.go b/cmd/help_fmt.go index b4d560827..8ab563c70 100644 --- a/cmd/help_fmt.go +++ b/cmd/help_fmt.go @@ -116,6 +116,8 @@ Use "{{.CommandPath}} [command] --help" for more information about a command.{{e `, flagHelpOutput) } +// to80CharCols takes a string s as input and returns a new string that is split +// into multiple lines with each line having a maximum of 80 characters func to80CharCols(s string) string { var splitAt80 string splitSpaces := strings.Split(s, " ") diff --git a/cmd/version.go b/cmd/version.go index 7b9da7797..0db82f179 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -29,7 +29,7 @@ func (v *VersionCmd) Init() *cobra.Command { return &cobra.Command{ Use: "version", Short: "Print the current Atlantis version", - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { fmt.Printf("atlantis %s\n", v.AtlantisVersion) }, }