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)