Go语言编程基础 方法与接口(四)(完结)——Stringer、Reader、Image_go image.image 转 io.reader-CSDN博客

网站介绍:文章浏览阅读273次。14 Stringerfmt包中定义的Stringer是最普遍的接口之一。type Stringer interface { String() string}Stringer是一个可以用字符串描述自己的类型。fmt包(还有很多包)都通过此接口来打印值。package mainimport "fmt"type ss struct{ ii int}func (s ss)..._go image.image 转 io.reader