sig-auth.git

git clone https://git.crispbyte.dev/sig-auth.git

commit
b7671b9
parent
65934ea
author
cheddar
date
2025-02-16 19:57:24 +0100 CET
Handle required parameter
1 files changed,  +6, -1
M main.go
+6, -1
 1@@ -20,12 +20,17 @@ import (
 2 func main() {
 3 	useClient := flag.Bool("c", false, "Run client")
 4 
 5-	keyPath := flag.String("key", "", "Path to the private (client mode) or public (server mode) to use")
 6+	keyPath := flag.String("key", "", "Path to the private key (client mode) or public key (server mode) to use - Required")
 7 
 8 	simulateCaddy := flag.Bool("caddy", false, "Simulate caddy reverse proxy")
 9 
10 	flag.Parse()
11 
12+	if *keyPath == "" {
13+		flag.PrintDefaults()
14+		return
15+	}
16+
17 	if *useClient {
18 		runClient(keyPath, *simulateCaddy)
19 	} else {