From db065b2fb9d2f69c75d59c30dca8f9b9eedd3530 Mon Sep 17 00:00:00 2001 From: Justin Reichardt Date: Fri, 19 Aug 2022 19:51:52 -0500 Subject: [PATCH] Added more useful help message --- src/rhosts.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/rhosts.go b/src/rhosts.go index 9399c4b..21d04e9 100644 --- a/src/rhosts.go +++ b/src/rhosts.go @@ -48,6 +48,11 @@ const GPL = ` You should have received a copy of the GNU General Public License along with this program. If not, see . ` +const usage = ` +This program's settings are modified by the rhost.cfg file and by setting the following flags: + +` + func main() { exit := make(chan bool) @@ -57,6 +62,10 @@ func main() { var versionflag bool = false var removetimestamp bool = false + flag.Usage = func() { // [4] + fmt.Fprintf(flag.CommandLine.Output(), GPL + usage) + flag.PrintDefaults() + } // Parsing Flags flag.BoolVar(&webserver, "s", false, "Turn on the Webserver") flag.BoolVar(&daemon, "d", false, "Should this be run in daemon mode")