1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-14 11:23:09 +02:00
lazygit/scripts/cheatsheet/main.go

28 lines
492 B
Go
Raw Normal View History

2022-01-04 01:46:14 +02:00
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())
2022-01-04 01:46:14 +02:00
case "check":
cheatsheet.Check()
default:
log.Fatal("\nUnknown command. Expected one of 'generate', 'check'")
}
}