Documentation
¶
Index ¶
- func ConcurrentAction(maxConcurrent uint, action func(interface{}) (interface{}, error)) (chan<- interface{}, <-chan ConcurentOutput)
- func FirstLowerCase(s string) string
- func FirstUpperCase(s string) string
- func GetID(r *http.Request) string
- func IncludesString(array []string, lookup string) bool
- func IsRoot(r *http.Request) bool
- func LookupEnvBool(key string, defaultValue bool) bool
- func LookupEnvFloat64(key string, defaultValue float64) float64
- func LookupEnvInt(key string, defaultValue int) int
- func LookupEnvString(key, defaultValue string) string
- func LookupEnvUint(key string, defaultValue uint) uint
- func Sha1(o interface{}) string
- func SnakeCase(s string) string
- type ConcurentOutput
- type Flag
- func (f *Flag) Default(defaultValue interface{}) *Flag
- func (f *Flag) Label(label string) *Flag
- func (f *Flag) Name(name string) *Flag
- func (f *Flag) ToBool(fs *flag.FlagSet) *bool
- func (f *Flag) ToFloat64(fs *flag.FlagSet) *float64
- func (f *Flag) ToInt(fs *flag.FlagSet) *int
- func (f *Flag) ToString(fs *flag.FlagSet) *string
- func (f *Flag) ToUint(fs *flag.FlagSet) *uint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConcurrentAction ¶
func ConcurrentAction(maxConcurrent uint, action func(interface{}) (interface{}, error)) (chan<- interface{}, <-chan ConcurentOutput)
ConcurrentAction create a pool of goroutines for executing action with concurrency limits (default to NumCPU)
func FirstLowerCase ¶
FirstLowerCase change first letter to lowerCase
func FirstUpperCase ¶
FirstUpperCase change first letter to UpperCase
func IncludesString ¶
IncludesString checks in an array includes given string
func LookupEnvBool ¶
LookupEnvBool search for given key in environment as bool
func LookupEnvFloat64 ¶ added in v2.0.2
LookupEnvFloat64 search for given key in environment as float64
func LookupEnvInt ¶
LookupEnvInt search for given key in environment as int
func LookupEnvString ¶
LookupEnvString search for given key in environment
func LookupEnvUint ¶
LookupEnvUint search for given key in environment as uint
Types ¶
type ConcurentOutput ¶
type ConcurentOutput struct { Input interface{} Output interface{} Err error }
ConcurentOutput contains input, output and error from action
Click to show internal directories.
Click to hide internal directories.