草庐IT

issueKey

全部标签

dictionary - 在结构中初始化嵌套映射

我是Go的新手,我正在使用来自REST端点的一些数据。我解码了我的json,我正在尝试用几个嵌套映射填充自定义结构:typeEpicFeatureStorystruct{KeystringDescriptionstringFeaturesmap[string]struct{NamestringDescriptionstringStoriesmap[string]struct{NamestringDescriptionstring}}}当我遍历我的特征时,我试图将它们添加到结构中的特征映射中。//Oneofmylastattempts(ofmany)EpicData.Features=m

dictionary - 在结构中初始化嵌套映射

我是Go的新手,我正在使用来自REST端点的一些数据。我解码了我的json,我正在尝试用几个嵌套映射填充自定义结构:typeEpicFeatureStorystruct{KeystringDescriptionstringFeaturesmap[string]struct{NamestringDescriptionstringStoriesmap[string]struct{NamestringDescriptionstring}}}当我遍历我的特征时,我试图将它们添加到结构中的特征映射中。//Oneofmylastattempts(ofmany)EpicData.Features=m