假設(shè)我有個PersonstructtypePersonstruct{}typeManstruct{Person}typeHumanstruct{Person}現(xiàn)在我想要一個函數(shù)p(aPerson)參數(shù)是Person類型,然后我想定義一個Man跟Human實(shí)例,可以調(diào)用p這個方法,請問怎么實(shí)現(xiàn)呢
萌新求教!golang 函數(shù)參數(shù)如何用一個公共struct萬分感謝
紫衣仙女
2019-09-13 10:30:45