1 回答
TA贡献1942条经验 获得超3个赞
如果您想将其初始化为文字,则需要将所有逗号放在适当的位置:
request := request{
headerRecord: headerRecord{
ClientNumber: "0000000001",
BusinessUnit: "Biz Unit",
ValidationKey: "123456",
DataYear: "2016",
DataMonth: "05",
TotalRevenue: "600.00",
},
ItemList: []dataRecord{
{
LineNumber: "1",
InvoiceNumber: "123456",
Zipcode: "75024",
TransDate: "2016-05-15",
Revenue: "100.00",
TaxSitusRule: "05",
TransTypeCode: "050201",
SalesTypeCode: "B",
RegulatoryCode: "99",
TaxExemptionCodeList: []string{"00"},
Geocode: "",
},
},
}
请查看Go Playground中的工作示例。
- 1 回答
- 0 关注
- 109 浏览
添加回答
举报