Joffref / Joffref/genz

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

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
7
Forks
3
PR merge metrics
No merged PRs in 30d

Description

### 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.
```go
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

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.