proposal: spec: add structfield type and syntax to directly access a structs structfield #70564
Labels
LanguageChange
Suggested changes to the Go language
LanguageChangeReview
Discussed by language change review committee
Proposal
Milestone
Proposal Details
Problem:
I want to write generic functions without manually rewriting functions for each struct field i am comparing.
structfield
typeany
would work in the definition.Current state of Go:
Proposed go code:
..User.FirstName
refers to the FirstName field of the User struct....
or..
in certain cases.The text was updated successfully, but these errors were encountered: