...

Package option

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

Overview ▾

type Interface

Interface defines the minimum interface that an option must fulfill

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{}
}

func New

func New(ident, value interface{}) Interface

New creates a new Option