We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef76b11 commit b00ab1eCopy full SHA for b00ab1e
main.go
@@ -5,6 +5,7 @@ import (
5
"log"
6
"os"
7
"strconv"
8
+ "time"
9
10
"github.com/darkfronza/alien-invasion/simulation"
11
"github.com/darkfronza/alien-invasion/worldmap"
@@ -14,6 +15,12 @@ var Version string
14
15
16
func main() {
17
// TODO: add daemon feature to test systemd on nix
18
+ if len(os.Args) == 2 && os.Args[1] == "daemon" {
19
+ fmt.Printf("daemon mode..... version=%s\n", Version)
20
+ time.Sleep(30 * time.Minute)
21
+ os.Exit(0)
22
+ }
23
+
24
if len(os.Args) == 2 && (os.Args[1] == "-v" || os.Args[1] == "version") {
25
fmt.Printf("alien-invasion simulator %s\n", Version)
26
os.Exit(0)
0 commit comments