Репост из: Go
Be Careful with Go Struct Embedding
Embedding structs can quietly mask deeper-nested fields: a duplicate field name isn’t ambiguous unless it appears at the same ‘depth’, meaning your program may choose an unintended value.
https://mattjhall.co.uk/posts/be-careful-with-go-struct-embedding.html
Embedding structs can quietly mask deeper-nested fields: a duplicate field name isn’t ambiguous unless it appears at the same ‘depth’, meaning your program may choose an unintended value.
https://mattjhall.co.uk/posts/be-careful-with-go-struct-embedding.html