Documentation
¶
Index ¶
- func CopyFile(src, dst string) (int64, error)
- func DecodeFromResponse(resp *http.Response) (raw *bytes.Reader, img image.Image, format string, err error)
- func DoAndExpectType(req *http.Request, expected string) (*http.Response, error)
- func DoAndReadJSON(req *http.Request, obj interface{}) error
- func ExecutableFolder() string
- func Get(url string) (*http.Response, error)
- func GetInType(url, expected string) (*http.Response, error)
- func Head(url string, followRedirection bool) (*http.Response, error)
- func IsReachableLink(url string) bool
- func ReadJSON(url string, obj interface{}) error
- func RemoveFilesByGlob(pattern string, confirm ConfirmRemove) error
- func Viewpoint(w0, h0 float64) (w, h float64)
- type ConfirmRemove
- type RegistryMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶ added in v0.3.0
CopyFile copy content of src to dst credit to https://opensource.com/article/18/6/copying-files-go
func DecodeFromResponse ¶ added in v0.4.3
func DecodeFromResponse(resp *http.Response) (raw *bytes.Reader, img image.Image, format string, err error)
DecodeFromResponse return picture in http response
func DoAndExpectType ¶ added in v0.4.3
DoAndExpectType sends request to server and expects response with specified content type
func DoAndReadJSON ¶ added in v0.4.3
DoAndReadJSON sends request and parse its JSON response
func ExecutableFolder ¶
func ExecutableFolder() string
ExecutableFolder returns path to the folder containing currently running executable file
func IsReachableLink ¶
IsReachableLink checks reachability of URL
func RemoveFilesByGlob ¶ added in v0.3.0
func RemoveFilesByGlob(pattern string, confirm ConfirmRemove) error
RemoveFilesByGlob deletes all files matching a specified glob pattern
Types ¶
type ConfirmRemove ¶ added in v0.3.0
type RegistryMap ¶
type RegistryMap map[string]interface{}
RegistryMap keeps any registrable pairs
func (RegistryMap) Get ¶
func (m RegistryMap) Get(name string) (v interface{}, ok bool)
Get a registered item
func (*RegistryMap) Register ¶
func (m *RegistryMap) Register(name string, v interface{})
Register an item
Click to show internal directories.
Click to hide internal directories.