Discover Packages
github.com/akualab/optioner
example
package
Version:
v0.0.0-...-7dbde00
Opens a new window with list of versions in this module.
Published: May 31, 2016
License: BSD-3-Clause
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func Age(o int ) optPerson
Age sets a value for instances of type Person.
func FSlice(o []float64 ) optExample
FSlice sets a value for instances of type Example.
func Ff(o func(int ) int ) optExample
Ff sets a value for instances of type Example.
Map sets a value for instances of type Example.
N sets a value for instances of type Example.
Name sets a value for instances of type Person.
Example is the struct that will hold optional values.
NewExample creates an example.
name is required.
func (t *Example ) Option(options ...optExample) (previous optExample)
Option method sets the options. Returns previous option for last arg.
Person is a human.
NewExample creates an example.
name is required.
func (t *Person ) Option(options ...optPerson) (previous optPerson)
Option method sets the options. Returns previous option for last arg.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.