If i had a Go struct
with a long list of fields. Is there a built-in way to initialize an instance while providing value for specific fields only?

如何在Go结构体中初始化特定字段
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- doutao4480 2016-11-17 16:12关注
You just have to write
structType{fieldName: value}
!本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报