1pkg/gopium

multiple embedded types issue

1pkg opened this issue · 1 comments

1pkg commented

Originally when I added transformation chain "go types" -> "gopium structs" -> "go ast" I thought that just using names for fields identifier enough. And it's mostly enough, if we are not taking to consideration multiple embedded types that go supports.

type TmplConn struct {
	template.Template
	sql.Conn
	params map[string]{}
}

In example above we have two different fields named "" internally, which skew chain transformation process, mainly sorting part 1pkg/gopium/fmtio/ast.go:126. In order to support multiple embedding types correctly we need use pair of name + position for fields identifier.

1pkg commented

Should be resolved in #22.