Documentation ¶
Overview ¶
Optional is a tool that generates 'optional' type wrappers around a given type T.
Typically this process would be run using go generate, like this:
//go:generate optional -type=Foo
running this command
optional -type=Foo
in the same directory will create the file optional_foo.go containing a definition of
type OptionalFoo struct { ... }
The default type is OptionalT or optionalT (depending on if the type is exported) and output file is optional_t.go. This can be overridden with the -output flag.
Click to show internal directories.
Click to hide internal directories.