util

package
v0.0.0-...-5f7c3e1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleOctetStream

func HandleOctetStream(url string) (string, error)

HandleOctetStream returns the absolute path to a temporary file containing a downloaded HTTP resource if the URL provided has a content-type of "application/octet-stream" (i.e. its body contains arbitary binary data). Otherwise, it will return an empty string. An empty string is always returned when there is an error.

func NewTmpFile

func NewTmpFile(body io.Reader) (string, error)

NewTmpFile returns the absolute path to a temporary file containing bytes copied from an io.Reader. It will return an empty string if there is an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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