Skip to content

Commit 68ee15d

Browse files
committed
Convert generate cmd func to const
1 parent 68f5566 commit 68ee15d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/generate_cheatsheet.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ import (
1919
"github.com/jesseduffield/lazydocker/pkg/i18n"
2020
)
2121

22+
const (
23+
generateCheatsheetCmd = "go run scripts/generate_cheatsheet.go"
24+
)
25+
2226
type bindingSection struct {
2327
title string
2428
bindings []*gui.Binding
@@ -43,7 +47,7 @@ func main() {
4347
content = fmt.Sprintf(
4448
"_This file is auto-generated. To update, make the changes in the "+
4549
"pkg/i18n directory and then run `%s` from the project root._\n\n%s",
46-
commandToRun(),
50+
generateCheatsheetCmd,
4751
content,
4852
)
4953
writeString(file, content)
@@ -140,7 +144,3 @@ func formatSections(mApp *app.App, bindingSections []*bindingSection) string {
140144

141145
return content
142146
}
143-
144-
func commandToRun() string {
145-
return "go run scripts/generate_cheatsheet.go"
146-
}

0 commit comments

Comments
 (0)