x/tools/gopls: support fillstruct for anonymous structs #39803
Closed
Comments
RE: the original placeholder comment "// TODO: anonymous structs, but who does that" This may already be well known, but the one place where that is key is when you're filling a slice of some struct: ss := &appsv1.StatefulSet{
Spec: appsv1.StatefulSetSpec{
Template: v1.PodTemplateSpec{
Spec: v1.PodSpec{
Containers: []v1.Container{
{},
},
},
},
},
} Currently you'd have to add the redundant v1.Container in front of the |
Change https://golang.org/cl/240463 mentions this issue: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The fix needs to be made in the analysisinternal package: https://github.com/golang/tools/blob/master/internal/analysisinternal/analysis.go#L110.
/cc @joshbaum
The text was updated successfully, but these errors were encountered: