原创 go語言接口使用

下面爲大家帶來go語言三種接口使用模式,代碼基於go1.0.2版本 第一種: package main import "fmt" type Writer interface { Write(data []byte) (int, e