From 68ee15d24d2923000513016f78171ed3d49cb15e Mon Sep 17 00:00:00 2001 From: Gustavo Andrioli Date: Mon, 10 Oct 2022 16:03:24 -0300 Subject: [PATCH] Convert generate cmd func to const --- scripts/generate_cheatsheet.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/generate_cheatsheet.go b/scripts/generate_cheatsheet.go index 79893b74..67b51f07 100644 --- a/scripts/generate_cheatsheet.go +++ b/scripts/generate_cheatsheet.go @@ -19,6 +19,10 @@ import ( "github.com/jesseduffield/lazydocker/pkg/i18n" ) +const ( + generateCheatsheetCmd = "go run scripts/generate_cheatsheet.go" +) + type bindingSection struct { title string bindings []*gui.Binding @@ -43,7 +47,7 @@ func main() { content = fmt.Sprintf( "_This file is auto-generated. To update, make the changes in the "+ "pkg/i18n directory and then run `%s` from the project root._\n\n%s", - commandToRun(), + generateCheatsheetCmd, content, ) writeString(file, content) @@ -140,7 +144,3 @@ func formatSections(mApp *app.App, bindingSections []*bindingSection) string { return content } - -func commandToRun() string { - return "go run scripts/generate_cheatsheet.go" -}