logoalt Hacker News

olingernyesterday at 7:27 PM2 repliesview on HN

> Second, a key in a struct literal may now be any valid field selector for the struct type, allowing fields in nested or embedded structs to be initialized directly

It's been a while since I've written more than anything trivial in golang, but this seems like a big deal to me. As in, I can define a struct that is consistent and reusable in other structs


Replies

andreimackenzieyesterday at 9:58 PM

This will shorten many test files!

konartyesterday at 8:07 PM

This is quite a QoL issue, but is it big? Nothing changes from functional point of view.

show 1 reply