doutuo1939
2014-05-17 05:05 阅读 221
已采纳

在Go中,如何遍历指针列表?

I want to iterate over this :

*list.List

How can I do it?

func Foo(key string, values *list.List) string {
...

//I want to iterate and get value from "values"
}

this Foo is being called like this:

kvs := make(map[string]*list.List)
res := Foo(k, kvs[k]) //k is string

Thanks!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

相关推荐