Add a clean exit for not providing a keymap to use
This commit is contained in:
parent
c2f2d16097
commit
d1b2d5623a
4
main.go
4
main.go
@ -30,6 +30,10 @@ func main() {
|
||||
flag.StringVar(&filePath, "f", "-", "The file to read content from. Defaults to stdin")
|
||||
flag.StringVar(&filePath, "file", "-", "The file to read content from. Defaults to stdin")
|
||||
flag.Parse()
|
||||
if flag.NArg() < 0 {
|
||||
flag.Usage()
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Println(keymapPath)
|
||||
|
||||
if filePath != "-" {
|
||||
|
Loading…
Reference in New Issue
Block a user