util

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2016 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendIfMissing

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

AppendIfMissing append to the slice if missing

func GenWorkers

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

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

func NewCustomLogger

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

NewCustomLogger creates logrus

func PrependProxyEnv

func PrependProxyEnv(cmd string) string

PrependProxyEnv prepends proxy enviroment variable

func ProxyEnv

func ProxyEnv() string

ProxyEnv returns shell environment variables to set proxy

func Truncate added in v0.1.6

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL