假設(shè)我有個(gè)PersonstructtypePersonstruct{}typeManstruct{Person}typeHumanstruct{Person}現(xiàn)在我想要一個(gè)函數(shù)p(aPerson)參數(shù)是Person類型,然后我想定義一個(gè)Man跟Human實(shí)例,可以調(diào)用p這個(gè)方法,請(qǐng)問怎么實(shí)現(xiàn)呢
跪求!golang 函數(shù)參數(shù)如何用一個(gè)公共struct跪求!
胡子哥哥
2019-09-08 21:08:48