change default hostname, print usage on 0 arg

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
This commit is contained in:
kim (grufwub) 2020-04-12 10:05:06 +01:00
parent a8c4aaba54
commit 6d8c8fcaa4

View File

@ -35,7 +35,7 @@ var (
ServerDir = ""
ServerRoot = flag.String("root", "/var/gopher", "Change server root directory.")
ServerHostname = flag.String("hostname", "localhost", "Change server hostname (FQDN).")
ServerHostname = flag.String("hostname", "127.0.0.1", "Change server hostname (FQDN).")
ServerPort = flag.Int("port", 70, "Change server port (0 to disable unencrypted traffic).")
// ServerTlsPort = flag.Int("tls-port", 0, "Change server TLS/SSL port (0 to disable).")
// ServerTlsCert = flag.String("cert", "", "Change server TLS/SSL cert file.")
@ -54,10 +54,6 @@ func main() {
/* Parse run-time arguments */
flag.Parse()
if flag.NFlag() == 0 {
flag.Usage()
os.Exit(0)
}
/* Setup _OUR_ loggers */
loggingSetup()