On Mon, Jun 7, 2021 at 11:20 AM Ally Dale <vipa...@gmail.com> wrote: > I want to know why golang change the access method.
The name of the programming language is Go. > Anyone who knows the isssue link, please reply me. Thanks a lot. There's no proposal and there's no issue. It always worked like that. You cannot initialize the field 'Name' of struct 'Value' because struct 'Value' has no such field. The (essentially) syntactic sugar that allows to access the inner field like in 'value.Name' is specified to work in selectors, not in initializers: https://golang.org/ref/spec#Selectors -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-UpAQsB%2BroTxMG-w9RdSQOqHUNdWXLNT%2BCYNak5xmbicA%40mail.gmail.com.