mapper

package
v0.0.0-...-59e6379 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirectMapTo

func DirectMapTo(src, dst interface{})

DirectMapTo just map the same name and type src and dst should be pointer of struct todo: support arrary as source

func JsonMapTo

func JsonMapTo(src, dst interface{})

Types

type DemoOne

type DemoOne struct {
	Id         int
	Value      string
	UpdateTime time.Time
	Data       []*ObjOne
	Nums       []int
	// contains filtered or unexported fields
}

type DemoTwo

type DemoTwo struct {
	Id         int
	Value      string
	UpdateTime time.Time
	Data       []*ObjTwo
	Nums       []int
}

type ObjOne

type ObjOne struct {
	Key   string
	Value string
}

type ObjTwo

type ObjTwo struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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