vuls: Index | Files

package util

import ""


Package Files

logutil.go util.go


var Log *logrus.Entry

Log for localhost

func AppendIfMissing Uses

func AppendIfMissing(slice []string, s string) []string

AppendIfMissing append to the slice if missing

func Distinct Uses

func Distinct(ss []string) (distincted []string)

Distinct a slice

func GenWorkers Uses

func GenWorkers(num int) chan<- func()

GenWorkers generates goroutine

func GetDefaultLogDir Uses

func GetDefaultLogDir() string

GetDefaultLogDir returns default log directory

func IP Uses

func IP() (ipv4Addrs []string, ipv6Addrs []string, err error)

IP returns scanner network ip addresses

func NewCustomLogger Uses

func NewCustomLogger(c config.ServerInfo) *logrus.Entry

NewCustomLogger creates logrus

func PrependProxyEnv Uses

func PrependProxyEnv(cmd string) string

PrependProxyEnv prepends proxy environment variable

func ProxyEnv Uses

func ProxyEnv() string

ProxyEnv returns shell environment variables to set proxy

func Truncate Uses

func Truncate(str string, length int) string

Truncate truncates string to the length

func URLPathJoin Uses

func URLPathJoin(baseURL string, paths ...string) (string, error)

URLPathJoin make URL

func URLPathParamJoin Uses

func URLPathParamJoin(baseURL string, paths []string, params map[string]string) (string, error)

URLPathParamJoin make URL

Package util imports 13 packages (graph) and is imported by 83 packages. Updated 2020-11-01. Refresh now. Tools for package owners.