urls

package
v0.0.0-...-1fe2c9b Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(resource *url.URL) (string, error)

File gets the provided resource to a temporary file on the local machine and returns the path.

func ReadFile

func ReadFile(resource *url.URL) ([]byte, error)

ReadFile returns the content of the provided resource as an array of bytes or returns an error.

func WithFile

func WithFile(resource *url.URL, callback func(path string) (interface{}, error)) (interface{}, error)

WithFile gets the provided resource to a temporary file on the local machine, invokes the callback with the path and returns the result. Note that the temporary file is deleted when the callback returns.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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