Documentation
¶
Index ¶
- func CPUProf() func()
- func Concat(a string, b ...string) string
- func First(args ...interface{}) interface{}
- func Last(args ...interface{}) interface{}
- func LogFatalError(err error)
- func Pick(index int, args ...interface{}) interface{}
- func RequiredStrFatal(name, str string)
- func Slice(args ...interface{}) []interface{}
- func StrCrop(str string, length int) string
- type SyncPrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CPUProf ¶
func CPUProf() func()
CPUProf runs the profiler and returns a function you need to defer
func First ¶
func First(args ...interface{}) interface{}
First returns first argument of a function return use it like
myutils.First(ab())
func Last ¶
func Last(args ...interface{}) interface{}
Last returns first argument of a function return use it like
myutils.Last(ab())
func LogFatalError ¶
func LogFatalError(err error)
LogFatalError it's a snippet for
if err != nil { log.Fatalf("Error: %s", err) }
func Pick ¶
func Pick(index int, args ...interface{}) interface{}
Pick returns picked argument of a function return use it like
myutils.Pick(1, ab())
func RequiredStrFatal ¶
func RequiredStrFatal(name, str string)
RequiredStrFatal it's a snippet for
if str == "" { log.Fatalf("Error: %s is empty", name) }
Types ¶
type SyncPrinter ¶
SyncPrinter is a thread-safe printer. It will output given queue without
func NewSyncPrinter ¶
func NewSyncPrinter() (*SyncPrinter, error)
NewSyncPrinter initialize a new SyncPrinter
Click to show internal directories.
Click to hide internal directories.