mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
add cheatsheet check script
This commit is contained in:
27
scripts/cheatsheet/main.go
Normal file
27
scripts/cheatsheet/main.go
Normal file
@ -0,0 +1,27 @@
|
||||
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.GetDir())
|
||||
case "check":
|
||||
cheatsheet.Check()
|
||||
default:
|
||||
log.Fatal("\nUnknown command. Expected one of 'generate', 'check'")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user