util

package
Version: v0.0.0-...-8b133c7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeJSON

func DecodeJSON(reader io.Reader, v interface{}) errs.Err

func HTTPGet

func HTTPGet(url string) (statusCode int, body string, err errs.Err)

func HTTPPostJSON

func HTTPPostJSON(url string, jsonPayload interface{}) (statusCode int, body string, err errs.Err)

func HTTPPostString

func HTTPPostString(url string, str string) (statusCode int, body string, err errs.Err)

func JSON

func JSON(v interface{}) (string, errs.Err)

func JSONBytes

func JSONBytes(v interface{}) ([]byte, errs.Err)

func JSONBytesIndent

func JSONBytesIndent(v interface{}, prefix, indent string) ([]byte, errs.Err)

func JSONMustPrettyPrint

func JSONMustPrettyPrint(v interface{}) string

func JSONReader

func JSONReader(v interface{}) (reader io.Reader, err errs.Err)

func Open

func Open(path string) (file *os.File, err errs.Err)

func ParseJSON

func ParseJSON(jsonStr string, v interface{}) errs.Err

func ParseJSONBytes

func ParseJSONBytes(jsonBytes []byte, v interface{}) errs.Err

Types

This section is empty.

Jump to

Keyboard shortcuts

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