gobuch/golang-language-samples/type-definition-interface/type-definition.go

17 lines
169 B
Go
Raw Permalink Normal View History

2020-08-21 04:26:40 +00:00
package main
import "fmt"
type File interface {
Read([]byte) (int, error)
Write([]byte) (int, error)
Close() error
}
func main() {
var f File
fmt.Println(f)
}