INNER CODE UNIT · Go

TestCopyWithTypeConverters

jinzhu/copier · copier_converter_test.go:16

func TestCopyWithTypeConverters(t *testing.T) {
	type SrcStruct struct {
		Field1 time.Time
		Field2 *time.Time
		Field3 *time.Time
		Field4 string
	}

	type DestStruct struct {
		Field1 string
		Field2 string
		Field3 string
		Field4 int
	}

	testTime := time.Date(2021, 3, 5, 1, 30, 0, 123000000, time.UTC)

	src := SrcStruct{

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…