util

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CHA = "abcdefghijklmnopqrstuvwxyz0123456789"

Variables

This section is empty.

Functions

func AddNewLine added in v0.5.2

func AddNewLine(body []byte) []byte

func AverageTime added in v0.4.0

func AverageTime(t time.Duration, n int) time.Duration

func BlueString added in v0.11.1

func BlueString(str string) string

func DebugJSON

func DebugJSON(data interface{})

func DebugSave

func DebugSave(data interface{})

func FileExists added in v0.9.0

func FileExists(path string) bool

func GetBody

func GetBody(client *http.Client, URL string) ([]byte, error)

func GetValue added in v0.5.4

func GetValue(message string, val *string, required bool)

func GreenString

func GreenString(str string) string

func LimitNumOfChars added in v0.5.2

func LimitNumOfChars(s string, n int) string

func PdfToTextLayout added in v0.6.6

func PdfToTextLayout(body []byte) ([]byte, error)

func PdfToTextRaw added in v0.6.6

func PdfToTextRaw(body []byte) ([]byte, error)

func PostBody

func PostBody(client *http.Client, URL string, data url.Values) ([]byte, error)

func RandString

func RandString(n int) string

func RedString

func RedString(str string) string

func SplitCmd added in v0.9.0

func SplitCmd(s string) (res []string)

Types

type Performance added in v0.4.0

type Performance struct {
	Fetching time.Duration
	Parsing  time.Duration
	// contains filtered or unexported fields
}

func (*Performance) Parse added in v0.4.0

func (p *Performance) Parse() string

func (*Performance) StartFetching added in v0.4.0

func (p *Performance) StartFetching()

func (*Performance) StartParsing added in v0.4.0

func (p *Performance) StartParsing()

func (*Performance) StopFetching added in v0.4.0

func (p *Performance) StopFetching()

func (*Performance) StopParsing added in v0.4.0

func (p *Performance) StopParsing()

Jump to

Keyboard shortcuts

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