summaryrefslogtreecommitdiff
path: root/client/main.go
diff options
context:
space:
mode:
authorraven <citrons@mondecitronne.com>2026-02-09 13:36:21 -0600
committerraven <citrons@mondecitronne.com>2026-02-09 13:36:21 -0600
commitea88db811f23e9ed5388d64c1b891a3496c909d9 (patch)
treee35f6e2d1cc3948120a261f4ae33fcafa7be8871 /client/main.go
parentd57467f12a97b1ca5a2dda2435b5a4d47ff73443 (diff)
allow specifying server address at command line
Diffstat (limited to 'client/main.go')
-rw-r--r--client/main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/main.go b/client/main.go
index 707cf7e..e4a9f6b 100644
--- a/client/main.go
+++ b/client/main.go
@@ -3,6 +3,7 @@ package main
import (
"citrons.xyz/talk/tui"
"citrons.xyz/talk/client/clipboard"
+ "flag"
"time"
"fmt"
"os"
@@ -11,6 +12,12 @@ import (
var globalApp *application
func main() {
+ flag.Parse()
+ address := flag.Arg(0)
+ if address == "" {
+ address = "talk.citrons.xyz:27508"
+ }
+
go clipboard.DiscoverCommand()
err := tui.Start()
@@ -23,7 +30,7 @@ func main() {
fmt.Println("bye!")
}()
- globalApp = newApplication("alt.mondecitronne.com:27508")
+ globalApp = newApplication(address)
go globalApp.RunClient()
defer globalApp.Stop()