utils

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LocalLocation *time.Location
View Source
var QuotedStringPattern = regexp.MustCompile(`^"(.*)"`)

Functions

func Detail

func Detail(something interface{}) string

func ListOfStringContain

func ListOfStringContain(haystack []string, needle string) bool

func Md5sum

func Md5sum(file string) (string, error)

func NewProgressWriter

func NewProgressWriter(w io.Writer) *progressWriter

func Print

func Print(v ...interface{})

func Print2

func Print2(v ...interface{})

func Print3

func Print3(v ...interface{})

func Print4

func Print4(v ...interface{})

func Printf

func Printf(format string, v ...interface{})

func Println

func Println(v ...interface{})

func StackTrace

func StackTrace(skip int, depth int) string

func StripQuotedString

func StripQuotedString(source string) string

func TraceDetail

func TraceDetail(o interface{})

func TracePrint

func TracePrint(skip int, cnt int, v ...interface{})

Types

type CallerInfo

type CallerInfo struct {
	// contains filtered or unexported fields
}

func GetCallerInfo

func GetCallerInfo(skip int) *CallerInfo

func (*CallerInfo) FileName

func (caller *CallerInfo) FileName() string

func (*CallerInfo) FuncName

func (caller *CallerInfo) FuncName() string

func (*CallerInfo) LineNumber

func (caller *CallerInfo) LineNumber() int

type ProgressReader

type ProgressReader interface {
	io.Reader
	N() int64
	SetReader(reader io.Reader) io.Reader
}

func NewProgressReader

func NewProgressReader(r io.Reader) ProgressReader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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