utils

package
Version: v0.0.0-...-45692f4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(url, filename string)

func DownloadFileFromURL

func DownloadFileFromURL(url, destPath string) (int64, error)

func FailOnError

func FailOnError(err error, msg string)

func ReadCsv

func ReadCsv(r *bufio.Reader, maxLength int, channel chan []byte) error

func ReadCsvFile

func ReadCsvFile(src string, maxLength int, channel chan []byte) error

func ReadCsvFileHeader

func ReadCsvFileHeader(src string, separator string) ([]string, error)

func ReadDirectoryFileInfos

func ReadDirectoryFileInfos(folderFilename string) []os.FileInfo

func RecoverFromError

func RecoverFromError(w http.ResponseWriter)

func SendJSON

func SendJSON(w http.ResponseWriter, data interface{})

func Unzip

func Unzip(src, dest string) error

func UnzipArchive

func UnzipArchive(zipFilename, folderFilename string)

Types

type FileInfosBySize

type FileInfosBySize []os.FileInfo

func (FileInfosBySize) Len

func (fis FileInfosBySize) Len() int

func (FileInfosBySize) Less

func (fis FileInfosBySize) Less(i, j int) bool

func (FileInfosBySize) Swap

func (fis FileInfosBySize) Swap(i, j int)

Jump to

Keyboard shortcuts

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