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

"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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant