Golang, Does the internal operation to slice influence the original slice outside?

前端 未结 0 1038
半阙折子戏
半阙折子戏 2020-12-13 19:12

For example:

func test(requiredIp []int, i int) []int {
    requiredIp = append(requiredIp[0:i], requiredIp[i+1:]...)
    return requiredIp
}

func main(){
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题