Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeferClose ¶
DeferClose captures the error returned from closing (if an error occurs). This is designed to be used in a defer statement.
func ReadJSON ¶
func ReadJSON(r io.ReadCloser, data interface{}) error
ReadJSON reads a JSON data from r and then closes it. An error due to invalid json will be returned as a JSONError
Types ¶
type FieldError ¶
type FieldError struct {
// contains filtered or unexported fields
}
FieldError connects an error to a particular field
func ParseUint64VarsField ¶
func ParseUint64VarsField(vars map[string]string, varName string) (uint64, *FieldError)
ParseUint64VarsField connects strconv.ParseUint with request variables It hardcodes the base to 10 and bitsize to 64 Any error returned will connect the requested field to the error via FieldError
Click to show internal directories.
Click to hide internal directories.