mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-14 11:23:09 +02:00
28 lines
492 B
Go
28 lines
492 B
Go
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'")
|
|
}
|
|
}
|