Skip to content

value -> ptr can't work? #24

Description

@gatspy

code

type MenuSrc struct {
	Name string
	Code *string
	ID   uint64
}

type MenuDst struct {
	Name *string
	Code *string
	ID   uint64
}


func TestCopy(t *testing.T) {
	var name = "google"
	var dst = &MenuDst{}

	var src = &MenuSrc{
		ID:   252271854679490561,
		Name: name,
	}

	err := deepcopier.Copy(src).To(dst)
	if err != nil {
		t.Error(err)
	}
}

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions