From d21a74388d8d41aec81ae5e0b0d48ba1ab3ac06a Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Mon, 18 Nov 2024 08:57:32 +0100 Subject: [PATCH] feat: update usage output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add custom usage message - include instructions for WebSocket client connection 🤖 --- cmd/server/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/server/main.go b/cmd/server/main.go index 330afec..25fc443 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -24,6 +24,13 @@ var ( // Start the pomodoro server func Start() { + // Update usage output + flag.Usage = func() { + fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", "GoTomato") + flag.PrintDefaults() + fmt.Println("\nPoint your client to 'ws://:/ws'") + } + flag.Parse() // show server and protocl version and exit