util

package
v0.0.0-...-e646c16 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cookies = make(map[string]string)

Cookies contains all HTTP cookies to send

View Source
var Headers = make(map[string]string)

Headers contains all HTTP headers to send

Functions

func BuildDb

func BuildDb() ([]map[string]string, [][]string, error)
func Cookie(n string, v string)

func Get

func Get(url string, client ...*http.Client) (string, error)

func GetDetail

func GetDetail(purl string) string

func GetJson

func GetJson() ([]byte, error)

TODO: Fix me

func GetTable

func GetTable(s string) ([]string, error)

func GetTableV2

func GetTableV2(s string) ([]string, error)

func GetWithClient

func GetWithClient(url string, client *http.Client) (string, error)

GetWithClient returns the HTML returned by the url using a provided HTTP client

func Header(n string, v string)

Header sets a new HTTP header

func SetDebug

func SetDebug(d bool)

SetDebug sets the debug status Setting this to true causes the panics to be thrown and logged onto the console. Setting this to false causes the errors to be saved in the Error field in the returned struct.

func Show

func Show()

func ShowJson

func ShowJson()

func Tag

func Tag(s string) ([]string, []string, error)

func ToJson

func ToJson(call []map[string]string, status [][]string) ([]byte, error)

func WriteJson

func WriteJson(filename string) error

Types

type DB

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

type HTTP

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

Jump to

Keyboard shortcuts

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