mapper

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValueMapper

type ValueMapper[V1, V2 comparable] struct {
	// contains filtered or unexported fields
}

func MustNewValueMapper

func MustNewValueMapper[V1, V2 comparable](m map[V1]V2) *ValueMapper[V1, V2]

func NewValueMapper

func NewValueMapper[V1, V2 comparable](m map[V1]V2) (*ValueMapper[V1, V2], error)

func (*ValueMapper[V1, V2]) From

func (m *ValueMapper[V1, V2]) From(v2 V2) (v1 V1, ok bool)

func (*ValueMapper[V1, V2]) FromMust

func (m *ValueMapper[V1, V2]) FromMust(v2 V2) V1

func (*ValueMapper[V1, V2]) Into

func (m *ValueMapper[V1, V2]) Into(v1 V1) (v2 V2, ok bool)

func (*ValueMapper[V1, V2]) IntoMust

func (m *ValueMapper[V1, V2]) IntoMust(v1 V1) V2

Jump to

Keyboard shortcuts

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