Skip to content
generated from atomicgo/template

⚙️ Minimalistic library for accepting and validating options

License

Notifications You must be signed in to change notification settings

atomicgo/option

Repository files navigation

AtomicGo | option

Downloads Latest Release Tests Coverage Unit test count License: MIT Go report


Documentation | Contributing | Code of Conduct


AtomicGo

go get atomicgo.dev/option

option

import "atomicgo.dev/option"

Package option provides a simple way to accept options in your structs.

Example (Demo)

package main

import ()

func main() {

}

Index

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 struct {
    // contains filtered or unexported fields
}

func String

func String(v string) StringOption

Generated by gomarkdoc


AtomicGo.dev  ·  with ❤️ by @MarvinJWendt | MarvinJWendt.com

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages