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

[Enhancement]: Cannot test a Type with the same name as the parsed type because of name overlapping #35

Open
1 task done
leorolland opened this issue Jan 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@leorolland
Copy link
Collaborator

Contact Details

No response

What is the problem?

We cannot generate a Type with the same name as the parsed type because of name overlapping.

Ex.

package main

type Human struct {
	//+required
	Firstname string
	//+required
	Lastname string
	Age uint
}

Template

package main

type {{ .Type.InternalName }}) struct {}

if you want genz tests, you will have both human.go and expected.go in the same package, with the name Human overlapping

What is the solution?

Quickfix https://github.com/Joffref/genz/tree/expected-in-dir

Why is this important?

No response

What are the alternatives?

to discuss

What is the impact?

blocker for some cases

Code of Conduct

  • I agree to follow this project's Code of Conduct
@leorolland leorolland added the enhancement New feature or request label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant