util

package
v0.0.0-...-e976548 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(b bool, msg string)

Assert calls DieOnError is false

func DieOnError

func DieOnError(err error, args ...string)

DieOnError kills the procss if err is not nil

func GetBytes

func GetBytes(urlS string, hdrs map[string]string) ([]byte, bool)

GetBytes fetch urlS and return []byte

func GetDoc

func GetDoc(urlS string, hdrs map[string]string) (*goquery.Document, []byte, bool)

GetDoc fetch and html document and parses it

func GetJSON

func GetJSON(urlS string, hdrs map[string]string) (*fastjson.Value, []byte, bool)

GetJSON is similar to GetDoc but returns a fastjson object

func LogError

func LogError(err string)

LogError does that

Types

This section is empty.

Jump to

Keyboard shortcuts

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