dir-server

Simple http(s) server
git clone https://www.brianlane.com/git/dir-server
Log | Files | Refs

commit d5ea681f7776014a38c4b992b417e3223e680bff
parent 30f1ad4f6320fd1419bdba3cde22d0898433b250
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Sat,  2 Apr 2022 15:11:52 -0700

Remove manual default strings from flag setup

The flag module prints these for us :)

Diffstat:
Mmain.go | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.go b/main.go @@ -55,13 +55,13 @@ var cfg = cmdlineArgs{ } func init() { - flag.StringVar(&cfg.ListenIP, "ip", cfg.ListenIP, "IP Address to Listen to (0.0.0.0)") - flag.IntVar(&cfg.ListenPort, "port", cfg.ListenPort, "Port to listen to (8000)") + flag.StringVar(&cfg.ListenIP, "ip", cfg.ListenIP, "IP Address to Listen to") + flag.IntVar(&cfg.ListenPort, "port", cfg.ListenPort, "Port to listen to") flag.BoolVar(&cfg.TLS, "tls", cfg.TLS, "Use https instead of http") flag.StringVar(&cfg.Cert, "cert", cfg.Cert, "Path to temporary cert.pem") flag.StringVar(&cfg.Key, "key", cfg.Key, "Path to temporary key.pem") flag.BoolVar(&cfg.SinglePage, "single", cfg.SinglePage, "Single page app, direct all unknown routes to index.html") - flag.StringVar(&cfg.Path, "path", cfg.Path, "Path to serve files from (./)") + flag.StringVar(&cfg.Path, "path", cfg.Path, "Path to serve files from") flag.Parse() }