From 0eb1a032dc54d3ef7d0e34b39010925cf4e9c35f Mon Sep 17 00:00:00 2001 From: Nils Date: Tue, 28 Dec 2021 03:54:31 +0100 Subject: [PATCH] remove help placeholder --- main.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/main.go b/main.go index 898ccc2..cdb83b6 100644 --- a/main.go +++ b/main.go @@ -14,10 +14,10 @@ import ( var logstdout = log.New() var logfile = log.New() -var logfilepath string var listenport int func init() { + var logfilepath string flag.StringVar(&logfilepath, "logfilepath", "probehost2.log", "sets the output file for the log") flag.IntVar(&listenport, "port", 8000, "sets the port to listen on") flag.Parse() @@ -64,10 +64,6 @@ func runner(remoteip string, command string, args... string) string{ return string(cmd) } -func showhelp(w http.ResponseWriter, req *http.Request) { - fmt.Fprintln(w, "placeholder") -} - func validatehosts(hosts []string) []string{ var valid []string for _, host := range hosts { @@ -113,7 +109,6 @@ func mtr(w http.ResponseWriter, req *http.Request) { func main() { http.HandleFunc("/ping/", ping) http.HandleFunc("/mtr/", mtr) - http.HandleFunc("/", showhelp) logstdout.Info("Serving on :", listenport) logfile.Info("Serving on :", listenport) http.ListenAndServe(fmt.Sprint(":", listenport), nil)