srcstate

package
v5.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Values holds all possible values.

Functions

This section is empty.

Types

type Value

type Value byte

Value describes the state of a source compared to a piece of data.

const (
	Custom Value = iota
	Matched
	Mismatched
	Missing
)

Possible values.

const LastValue Value = Missing

LastValue is the last valid value.

func ExtractValue

func ExtractValue(str string) Value

ExtractValue extracts the value from a string.

func (Value) AltString

func (enum Value) AltString() string

AltString returns the alternate string.

func (Value) EnsureValid

func (enum Value) EnsureValid() Value

EnsureValid ensures this is of a known value.

func (Value) Key

func (enum Value) Key() string

Key returns the key used in serialization.

func (Value) MarshalText

func (enum Value) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface.

func (Value) String

func (enum Value) String() string

String implements fmt.Stringer.

func (*Value) UnmarshalText

func (enum *Value) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL