httputil

package
v0.0.0-...-d26fc85 Latest Latest
Warning

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

Go to latest
Published: May 2, 2015 License: BSD-3-Clause Imports: 1 Imported by: 2

Documentation

Overview

Package httputil provides utilities useful when dealing with http responses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseError

type ResponseError struct {
	// Message shall be an informative message about the error.
	Message string `json:"message"`
}

ResponseError shall be used when an error response shall be returned.

func NewResponseError

func NewResponseError(msg string) *ResponseError

NewResponseError creates a new ResponseError.

func (*ResponseError) JSON

func (re *ResponseError) JSON() string

JSON formats a ResponseError to JSON.

Jump to

Keyboard shortcuts

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