Skip to content
New issue

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

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

Already on GitHub? # to your account

"undefined" reporter on type from same module #15

Open
elszon opened this issue Nov 21, 2024 · 0 comments
Open

"undefined" reporter on type from same module #15

elszon opened this issue Nov 21, 2024 · 0 comments

Comments

@elszon
Copy link

elszon commented Nov 21, 2024

When tagalign is called on a struct with a member of the type defined in the same module, tagalign reports undefined.

e.g.:
file: a.go

package model

type A struct {
	AA int `json:"aa,omitempty"`
	AB int `json:"ab,omitempty"`
}

file b.go

package model

type B struct {
	BA int `json:"ba,omitempty"`
	AA A   `json:"aa,omitempty"`
}

tagalign called on b.go:

tagalign b.go
-: # command-line-arguments
./b.go:5:5: undefined: A
sandbox/align/internal/model/b.go:5:5: undefined: A
tagalign: 2 errors during loading
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant