summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-09-29 18:42:53 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-09-29 20:38:29 +0200
commit7af371701d44dbde052235522876c1bf75f05c91 (patch)
treeebdebeee596b4202cf50abc0e2d42b10f3bea680 /scripts
parent5ccc95b76fbaa8d268818159d6ff4d64d23b153c (diff)
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)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cheatsheet/main.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/scripts/cheatsheet/main.go b/scripts/cheatsheet/main.go
deleted file mode 100644
index 742bdc7d7..000000000
--- a/scripts/cheatsheet/main.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package main
-
-import (
- "fmt"
- "log"
- "os"
-
- "github.com/jesseduffield/lazygit/pkg/cheatsheet"
-)
-
-func main() {
- if len(os.Args) < 2 {
- log.Fatal("Please provide a command: one of 'generate', 'check'")
- }
-
- command := os.Args[1]
-
- switch command {
- case "generate":
- cheatsheet.Generate()
- fmt.Printf("\nGenerated cheatsheets in %s\n", cheatsheet.GetKeybindingsDir())
- case "check":
- cheatsheet.Check()
- default:
- log.Fatal("\nUnknown command. Expected one of 'generate', 'check'")
- }
-}