Go 的 interface 隱式滿足,型別有方法就算數,小介面加 embedding 取代繼承,對介面寫程式配 adapter 就能抽換實作,gortex 換 OTel tracing 就是例子。
← 標籤