【发布时间】:2020-11-18 09:14:40
【问题描述】:
我在尝试时收到此错误“无法获取附加结果的地址”:
s := []int{1, 2}
temp := &s
temp = &append(*temp, 3)
但是如果我像这样进行细微的更改:
s := []int{1, 2}
temp := &s
temp2 := append(*temp, 3)
temp = &temp2
没有错误。
我被导航到这个issue,但我无法理解它是 cmets。
谁能解释一下区别?
【问题讨论】:
-
你说“我收到了这个错误”,但你从来没有提到过错误。
-
如果能看懂链接问题中的cmets,有什么问题?
标签: go