forked from Bios-Marcel/cordless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
25 lines (21 loc) · 796 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//+build go1.12
package main
import (
"flag"
"fmt"
"github.com/Bios-Marcel/cordless/app"
"github.com/Bios-Marcel/cordless/shortcuts"
"github.com/Bios-Marcel/cordless/version"
)
func main() {
showVersion := flag.Bool("version", false, "Show the version instead of starting cordless")
showShortcutsDialog := flag.Bool("shortcut-dialog", false, "Shows the shortcuts dialog instead of launching cordless")
flag.Parse()
if showShortcutsDialog != nil && *showShortcutsDialog {
shortcuts.RunShortcutsDialogStandalone()
} else if showVersion != nil && *showVersion {
fmt.Printf("You are running cordless version %s\nKeep in mind that this version might not be correct for manually built versions, as those can contain additional commits.\n", version.Version)
} else {
app.Run()
}
}