copierx

package
v0.0.0-...-0cfe510 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SqlNullTimeToStringConverter = copier.TypeConverter{
		SrcType: sql.NullTime{},
		DstType: copier.String,
		Fn: func(src interface{}) (interface{}, error) {
			s, ok := src.(sql.NullTime)
			if !ok {
				return nil, errors.New("src type not matching")
			}
			if !s.Valid {
				return "", nil
			}
			return s.Time.Format(constant.DateTime), nil
		},
	}
)

Functions

func Copy

func Copy(toValue interface{}, fromValue interface{}) (err error)

Copy copy things

Types

This section is empty.

Jump to

Keyboard shortcuts

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