https://golang.org/issue/9859 is a proposal to support such syntax, but it 
hasn't really moved in a long time.
On Monday, June 7, 2021 at 2:47:07 AM UTC-7 axel.wa...@googlemail.com wrote:

> What we are saying is that you are misremembering. That's not how Go ever 
> worked.
>
> On Mon, Jun 7, 2021 at 11:36 AM Ally Dale <vip...@gmail.com> wrote:
>
>> As far as I remember(maybe I have missing something),  
>> var v = Value{
>>         Name:"xxx",
>> }
>> Is the old way to initial an embeded field.
>> Some issuse changes the way of this.
>> I can't find the original discussion.
>>
>> 在2021年6月7日星期一 UTC+8 下午5:28:27<axel.wa...@googlemail.com> 写道:
>>
>>> I don't understand the question. This has always been how the language 
>>> worked, all the way back to Go 1.0 at least. As far as I'm aware.
>>>
>>> Embedding only effects selector expressions and methods sets - i.e. it 
>>> allows you to write `v.Name` instead of writing `v.Base.Name`. It 
>>> doesn't affect composite literals.
>>>
>>> On Mon, Jun 7, 2021 at 11:20 AM Ally Dale <vip...@gmail.com> wrote:
>>>
>>>> Does anyone konw which proposal changes the access for embeded field 
>>>> name of struct?
>>>> Eg:
>>>> ```
>>>> type Base struct{
>>>>     Name string
>>>> }
>>>> type Value struct{
>>>>     Base
>>>> }
>>>> ```
>>>>
>>>> We initial a Value as:
>>>> var v = Value{
>>>>     Base: Base{
>>>>         Name:"xxx",
>>>>     }
>>>> }
>>>> instead of 
>>>> var v = Value{
>>>>         Name:"xxx",
>>>> }
>>>>
>>>> I want to know why golang change the access method.
>>>> Anyone who knows the isssue link, please reply me. Thanks a lot.
>>>>
>>>> -- 
>>>> 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...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/golang-nuts/ff4f3443-c863-4d96-958c-76023979b0ben%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/golang-nuts/ff4f3443-c863-4d96-958c-76023979b0ben%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/7d00093f-0253-489e-a5c9-40eceb5b2f1bn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/golang-nuts/7d00093f-0253-489e-a5c9-40eceb5b2f1bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/dbe225d6-9c1e-4b5c-b3f0-34699d88f8e2n%40googlegroups.com.

Reply via email to