options

package
v0.0.0-...-1ad6c80 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2014 License: Unlicense Imports: 2 Imported by: 0

Documentation

Overview

The options package includes some default option parsers for the requests package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(orig, value interface{}, optionValue string) (interface{}, error)

Default is an option func that sets a default value for a field. If the value doesn't exist in the request (or is nil), the provided default will be used instead.

func Immutable

func Immutable(orig, value interface{}, optionValue string) (interface{}, error)

Immutable is an option func that ensures that a value is not modified after being set. It will return an error if orig is non-empty and does not match the new value from the request.

func Required

func Required(orig, value interface{}, optionValue string) (interface{}, error)

Required is an option func that ensures a non-nil value was passed along in the request. It does not ensure that the value is non-empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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