option – github.com/lestrrat-go/option Index | Files

package option

import "github.com/lestrrat-go/option"

Index

Types

type Interface

type Interface interface {
	// Ident returns the "identity" of this option, a unique identifier that
	// can be used to differentiate between options
	Ident() interface{}

	// Value returns the corresponding value.
	Value() interface{}
}

Interface defines the minimum interface that an option must fulfill

func New

func New(ident, value interface{}) Interface

New creates a new Option

Source Files

option.go

Version
v1.0.1 (latest)
Published
Dec 15, 2022
Platform
linux/amd64
Imports
1 packages
Last checked
3 weeks ago

Tools for package owners.