Back to godoc.org
github.com/future-architect/vuls/util

package util

v0.11.0
Latest Go to latest
Published: 3 days ago | License: AGPL-3.0 | Module: github.com/future-architect/vuls

Index

Variables

var Log *logrus.Entry

Log for localhsot

func AppendIfMissing

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

AppendIfMissing append to the slice if missing

func Distinct

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

Distinct a slice

func GenWorkers

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

GenWorkers generates goroutine http://qiita.com/na-o-ys/items/65373132b1c5bc973cca

func GetDefaultLogDir

func GetDefaultLogDir() string

GetDefaultLogDir returns default log directory

func IP

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

IP returns scanner network ip addresses

func NewCustomLogger

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

NewCustomLogger creates logrus

func PrependProxyEnv

func PrependProxyEnv(cmd string) string

PrependProxyEnv prepends proxy environment variable

func ProxyEnv

func ProxyEnv() string

ProxyEnv returns shell environment variables to set proxy

func Truncate

func Truncate(str string, length int) string

Truncate truncates string to the length

func URLPathJoin

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

URLPathJoin make URL

func URLPathParamJoin

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

URLPathParamJoin make URL

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier