Is there a built in function in go for making copies of arbitrary maps?

后端 未结 4 1972
心在旅途
心在旅途 2021-01-04 04:19

Is there a built in function in go for making copies of arbitrary maps?

I would be able to write one by hand but I found out earlier I was looking a similar question

4条回答
  •  情话喂你
    2021-01-04 04:53

    No, there is no built-in one-liner for map deep copy.

    However, there is an iterative solution as well as a generic package for deep copy.

提交回复
热议问题