Documentation ¶
Index ¶
- func Debounce(interval time.Duration, maxDebounce int, input <-chan interface{}, ...)
- func FileSize(s int64) string
- func MergeChan(cs ...<-chan interface{}) <-chan interface{}
- func Min(A, B int) int
- func SetupLogger(cmd *cobra.Command, args []string)
- func SizeOfJSON(data map[string]interface{}) int
- func SortedKeys(m map[string]interface{}) []string
- func TypeOrEnv(cmd *cobra.Command, flag, envname string) string
- type ByCID
- type ByIID
- type ByMount
- type ByNID
- type ByPeer
- type ByPort
- type ByVName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debounce ¶
func Debounce(interval time.Duration, maxDebounce int, input <-chan interface{}, f func(arg interface{}))
Debounce (inspired from https://nathanleclaire.com/blog/2014/08/03/write-a-function-similar-to-underscore-dot-jss-debounce-in-golang/)
func FileSize ¶
FileSize calculates the file size and generate user-friendly string. (sources from gogs project)
func MergeChan ¶
func MergeChan(cs ...<-chan interface{}) <-chan interface{}
MergeChan merge chan (code from Go documentatio) TODO maybe replace by https://godoc.org/github.com/eapache/channels#Multiplex
func SetupLogger ¶
SetupLogger parse cmd for log level
func SizeOfJSON ¶
SizeOfJSON cumpotue size on a map object
func SortedKeys ¶
SortedKeys tools sort map[string]
Types ¶
Click to show internal directories.
Click to hide internal directories.