考慮以下幾點:構建從片陣列圍棋
var positionTitles []string
var positionRelationships []string
var positionInstitutions []string
positionTitles = ["Director" "Provost" "Assistant Provost"]
positionRelationships = ["Tenured Professor" "Lecturer" "Adjunct Professor"]
positionInstitutions = ["UCSC" "UCB" "USC"]
我將如何構建一個數組,看起來像這樣:
Positions :=
[{
PositionTitle: "Director",
PositionRelationships: "Tenured Professor",
PositionInstitution: "UCSC",
},
{
PositionTitle: "Provost",
PositionRelationships: "Lecturer",
PositionInstitution: "UCB",
},
{
PositionTitle: "Assistant Provost",
PositionRelationships: "Adjunct Professor",
PositionInstitution: "USC",
}]
的目標是迭代的位置。
去遊樂場,我已經開始: http://play.golang.org/p/za_9U7eHHT