mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Convert generate cmd func to const
This commit is contained in:
parent
0024184ba2
commit
a5eece155c
1 changed files with 5 additions and 5 deletions
|
|
@ -19,6 +19,10 @@ import (
|
||||||
"github.com/jesseduffield/lazydocker/pkg/i18n"
|
"github.com/jesseduffield/lazydocker/pkg/i18n"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
generateCheatsheetCmd = "go run scripts/generate_cheatsheet.go"
|
||||||
|
)
|
||||||
|
|
||||||
type bindingSection struct {
|
type bindingSection struct {
|
||||||
title string
|
title string
|
||||||
bindings []*gui.Binding
|
bindings []*gui.Binding
|
||||||
|
|
@ -43,7 +47,7 @@ func main() {
|
||||||
content = fmt.Sprintf(
|
content = fmt.Sprintf(
|
||||||
"_This file is auto-generated. To update, make the changes in the "+
|
"_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",
|
"pkg/i18n directory and then run `%s` from the project root._\n\n%s",
|
||||||
commandToRun(),
|
generateCheatsheetCmd,
|
||||||
content,
|
content,
|
||||||
)
|
)
|
||||||
writeString(file, content)
|
writeString(file, content)
|
||||||
|
|
@ -140,7 +144,3 @@ func formatSections(mApp *app.App, bindingSections []*bindingSection) string {
|
||||||
|
|
||||||
return content
|
return content
|
||||||
}
|
}
|
||||||
|
|
||||||
func commandToRun() string {
|
|
||||||
return "go run scripts/generate_cheatsheet.go"
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue