added cli arg -help
as an alternative to -h
This commit is contained in:
parent
24a93fa1d4
commit
30cc8bc61e
1 changed files with 1 additions and 6 deletions
|
@ -17,17 +17,12 @@ import (
|
||||||
// === internal vars (no need to edit these!) ===
|
// === internal vars (no need to edit these!) ===
|
||||||
|
|
||||||
var running bool
|
var running bool
|
||||||
var i_was_IPv6 = false
|
|
||||||
var i_was_ported = false
|
|
||||||
var i_last_method string
|
var i_last_method string
|
||||||
var i_methods []string
|
var i_methods []string
|
||||||
|
|
||||||
//go:embed methods.txt
|
//go:embed methods.txt
|
||||||
var i_methods_file embed.FS
|
var i_methods_file embed.FS
|
||||||
|
|
||||||
//go:embed help.txt
|
|
||||||
var i_help_file embed.FS
|
|
||||||
|
|
||||||
// === timings ===
|
// === timings ===
|
||||||
|
|
||||||
// minimum wait for an update (ms).
|
// minimum wait for an update (ms).
|
||||||
|
@ -50,7 +45,7 @@ var port_chance = 0.05
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
if argIndex("h") >= 0 {
|
if argIndex("h") >= 0 || argIndex("help") >= 0 {
|
||||||
showHelp()
|
showHelp()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue