util

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 13 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 DebugJSON

func DebugJSON(data interface{})

func DebugSave

func DebugSave(data interface{})

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 PdfToText added in v0.5.2

func PdfToText(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

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