convert

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastMapToStruct

func CastMapToStruct[T any](data map[string]string, record *T, customConverters ...Converter) error

Types

type Converter

type Converter interface {
	SupportType() reflect.Type
	Convert(v string) (any, error)
}

type TimeConvert

type TimeConvert struct{}

func (*TimeConvert) Convert

func (d *TimeConvert) Convert(v string) (any, error)

func (*TimeConvert) SupportType

func (d *TimeConvert) SupportType() reflect.Type

Jump to

Keyboard shortcuts

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