Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

value -> ptr can't work? #24

Open
gatspy opened this issue Nov 22, 2020 · 0 comments
Open

value -> ptr can't work? #24

gatspy opened this issue Nov 22, 2020 · 0 comments

Comments

@gatspy
Copy link

gatspy commented Nov 22, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant