Documentation | Contributing | Code of Conduct
import "atomicgo.dev/option"
Package option provides a simple way to accept options in your structs.
Example (Demo)
package main
import ()
func main() {
}
type IntOption
type IntOption struct {
// contains filtered or unexported fields
}
func Int
func Int(v int) IntOption
type Option
type Option[T any] struct {
Value *T
Default T
}
type StringOption
type StringOption struct {
// contains filtered or unexported fields
}
func String
func String(v string) StringOption
Generated by gomarkdoc
AtomicGo.dev · with ❤️ by @MarvinJWendt | MarvinJWendt.com