chore: function docs, linting errors (#3380)

* Function documentation and linting errors

---------

Co-authored-by: Pantelis Karamolegkos <pantelis@workable.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
This commit is contained in:
Pantelis Karamolegkos
2023-06-20 21:51:40 +03:00
committed by GitHub
parent a173e84e5c
commit 8514255f7c
2 changed files with 3 additions and 1 deletions

View File

@@ -116,6 +116,8 @@ Use "{{.CommandPath}} [command] --help" for more information about a command.{{e
`, flagHelpOutput) `, 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 { func to80CharCols(s string) string {
var splitAt80 string var splitAt80 string
splitSpaces := strings.Split(s, " ") splitSpaces := strings.Split(s, " ")

View File

@@ -29,7 +29,7 @@ func (v *VersionCmd) Init() *cobra.Command {
return &cobra.Command{ return &cobra.Command{
Use: "version", Use: "version",
Short: "Print the current Atlantis 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) fmt.Printf("atlantis %s\n", v.AtlantisVersion)
}, },
} }