mirror of
https://github.com/byReqz/probehost2.git
synced 2024-11-21 22:33:14 +00:00
solve small linter nitpicks
This commit is contained in:
parent
e4d0d9bf61
commit
7b47ca1c58
6
main.go
6
main.go
@ -16,9 +16,9 @@ import (
|
|||||||
var logStdout = log.New()
|
var logStdout = log.New()
|
||||||
var logFile = log.New()
|
var logFile = log.New()
|
||||||
|
|
||||||
var listenPort = 8080 // port to listen on
|
var listenPort = 8080 // port to listen on
|
||||||
var disableXForwardedFor bool // whether to disable parsing the X-Forwarded-For header or not
|
var disableXForwardedFor bool // whether to disable parsing the X-Forwarded-For header or not
|
||||||
var allowPrivate bool // whether to allow private IP ranges or not
|
var allowPrivate bool // whether to allow private IP ranges or not
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
logStdout.SetFormatter(&log.TextFormatter{
|
logStdout.SetFormatter(&log.TextFormatter{
|
||||||
@ -84,7 +84,7 @@ func runner(remoteip string, command string, args ...string) string {
|
|||||||
return string(cmd)
|
return string(cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
// validatehosts checks the given host+port combinations for validity and returns valid hosts + valid ports seperately.
|
// validatehosts checks the given host+port combinations for validity and returns valid hosts + valid ports separately.
|
||||||
func validatehosts(hosts []string) ([]string, []string) {
|
func validatehosts(hosts []string) ([]string, []string) {
|
||||||
var validHosts []string
|
var validHosts []string
|
||||||
var validPorts []string
|
var validPorts []string
|
||||||
|
Loading…
Reference in New Issue
Block a user