-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.go
More file actions
39 lines (32 loc) · 740 Bytes
/
Copy pathmain.go
File metadata and controls
39 lines (32 loc) · 740 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
_ "embed"
"fmt"
"os"
"github.com/ftl/hellocontest/script"
"github.com/ftl/hellocontest/ui"
)
var version = "development"
//go:embed sponsors.txt
var sponsors string
func main() {
var startupScript ui.Script = nil
args := os.Args
if len(os.Args) > 1 {
switch os.Args[1] {
case "version":
fmt.Println(version)
os.Exit(0)
case "sponsors":
fmt.Printf("This release of Hello Contest is sponsored by:\n%s\nThank you all for your great support!\n73, Florian\n", sponsors)
os.Exit(0)
case "keybindings":
ui.PrintKeybindingsTable()
os.Exit(0)
case "screenshots":
startupScript = script.ScreenshotsScript
args = args[0:1]
}
}
ui.Run(version, sponsors, startupScript, args)
}