mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-17 00:18:05 +02:00
Use go:generate for generating cheatsheets
This has several benefits: - it's less code - we're using the same mechanism to generate all our auto-generated files, so if someone wants to add a new one, it's clear which pattern to follow - we can re-generate all generated files with a single command ("go generate ./...", or "make generate") - we only need a single check on CI to check that all files are up to date (see previous commit)
This commit is contained in:
14
pkg/cheatsheet/generator.go
Normal file
14
pkg/cheatsheet/generator.go
Normal file
@ -0,0 +1,14 @@
|
||||
//go:build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/cheatsheet"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Printf("Generating cheatsheets in %s...\n", cheatsheet.GetKeybindingsDir())
|
||||
cheatsheet.Generate()
|
||||
}
|
Reference in New Issue
Block a user