From 40c2b50f914944274f886ac3095361c739efb1f7 Mon Sep 17 00:00:00 2001 From: maru Date: Thu, 28 Dec 2023 22:08:50 -0500 Subject: [PATCH] Rename network flag to proto --- pokerogue-server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pokerogue-server.go b/pokerogue-server.go index ad8daee..473d274 100644 --- a/pokerogue-server.go +++ b/pokerogue-server.go @@ -12,7 +12,7 @@ import ( ) func main() { - network := flag.String("network", "tcp", "network type for server to listen on (tcp, unix)") + proto := flag.String("proto", "tcp", "protocol for api to use (tcp, unix)") address := flag.String("address", "0.0.0.0", "network address for server to listen on") dbuser := flag.String("dbuser", "pokerogue", "database username") @@ -28,16 +28,16 @@ func main() { log.Fatalf("failed to initialize database: %s", err) } - if *network == "unix" { + if *proto == "unix" { os.Remove(*address) } - listener, err := net.Listen(*network, *address) + listener, err := net.Listen(*proto, *address) if err != nil { log.Fatalf("failed to create net listener: %s", err) } - if *network == "unix" { + if *proto == "unix" { os.Chmod(*address, 0777) }