utils

package
v0.0.0-...-6945508 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2016 License: MIT Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

Exists method

func GetRequestBody

func GetRequestBody(r *http.Request) ([]byte, error)

GetRequestBody reads request and returns bytes

func PanicRecover

func PanicRecover() error

PanicRecover is handler for panic, wraps panic in error

func PopLine

func PopLine(in []byte) ([]byte, error)

PopLine removes first line

func ResolveHome

func ResolveHome(path string) string

ResolveHome resolves HomeDir

func Respond

func Respond(w http.ResponseWriter, data interface{}, code int) error

Respond sends HTTP response

func UnmarshalRequest

func UnmarshalRequest(r *http.Request, v interface{}) error

UnmarshalRequest unmarshal HTTP request to given struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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