added cli arg -help as an alternative to -h

This commit is contained in:
mellodoot 2023-05-10 23:43:16 +01:00
parent 24a93fa1d4
commit 30cc8bc61e
No known key found for this signature in database
GPG key ID: FDF03EEFB7BA59B6

View file

@ -17,17 +17,12 @@ import (
// === internal vars (no need to edit these!) ===
var running bool
var i_was_IPv6 = false
var i_was_ported = false
var i_last_method string
var i_methods []string
//go:embed methods.txt
var i_methods_file embed.FS
//go:embed help.txt
var i_help_file embed.FS
// === timings ===
// minimum wait for an update (ms).
@ -50,7 +45,7 @@ var port_chance = 0.05
func main() {
if argIndex("h") >= 0 {
if argIndex("h") >= 0 || argIndex("help") >= 0 {
showHelp()
return
}