doulin9679 2018-12-05 12:09
浏览 257

Golang var和文字用法

Option 1

var employees []Employee
session.Employees = employees

Option 2

session.Employees = []Employee{}

What, if any, is the difference in the two Golang code options, with respect to session.Employees after execution?

  • 写回答

1条回答 默认 最新

报告相同问题?