好看的皮囊千篇一律,有趣的灵魂万里挑一。
2019-3-19
重要的概念先说:Go语言的接口并不是其他语言(C++、Java、Php等)中所提到的接口概念。interface IFoo{ void Bar(); } class Foo implements IFoo{ //java //... } class Foo : public IFoo { //C++ // ... } IFoo* foo = new foo;
type IFoo interface { Bar() } type Foo struct { } func(f *Foo) Bar(){ }
标签: golang