vuls: github.com/future-architect/vuls/util Index | Files

package util

import "github.com/future-architect/vuls/util"

Index

Package Files

logutil.go util.go

Variables

var Log *logrus.Entry

Log for localhsot

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 http://qiita.com/na-o-ys/items/65373132b1c5bc973cca

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 12 packages (graph) and is imported by 62 packages. Updated 2019-09-26. Refresh now. Tools for package owners.