utils

package
v0.0.0-...-9feb207 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMediaList

func CreateMediaList(medias []*Media, context string) (*[]interface{}, *string)

func DebugLog

func DebugLog(fileName string, msg interface{})

func Get

func Get(url string) (*req.Resp, error)

func PostJSON

func PostJSON(url string, data interface{}) (*req.Resp, error)

func ThrowHttpErrorIfFail

func ThrowHttpErrorIfFail(res *http.Response) (err error)

Return a error message for some common HTTP error with some tips

Types

type Media

type Media struct {
	URL          string
	Caption      interface{}
	ReferenceKey string
}

Jump to

Keyboard shortcuts

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