csueiras / reinforcer

codegen for easy adoption of resiliency patterns
MIT License
8 stars 2 forks source link

Unexported interfaces are not handled correctly #35

Closed csueiras closed 3 years ago

csueiras commented 3 years ago

The code generator currently assumes that the target interfaces are exported which generates unexpected code when the target is unexported as it is not capitalized, for example:

type target interface {
  // ...
}

would generate an unexported struct and an odd constructor:

type target struct {
...
}

func Newtarget() *target {
...
}