日常開發中進行數據類型轉換是一個很常見的問題,比較常見的是map->struct , struct->map
json->map 。。。同時還需要一些字符串操作(合並,分割),以下整理了幾個不錯的工具
簡單說明
structs struct與map的處理
mapstructure map 與struct的處理
stew 一些方便的map,string 操作包
mergo 類型合並的
參考資料
http://github.com/fatih/structs
http://github.com/mitchellh/mapstructure
http://github.com/stretchr/objx
http://github.com/stretchr/stew
http://github.com/imdario/mergo