golang中interface{}转为struct

前端之家收集整理的这篇文章主要介绍了golang中interface{}转为struct前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

es,ok := services["elasticsearch"].(*elasticsearch.ElasticSearchService)@H_404_3@


@H_404_3@

interface{}转为struct需要assert为指针@H_404_3@

猜你在找的Go相关文章