メモメモ fmt
<- https://golang.org/pkg/fmt/#Fprint
func Fprint
func Fprint(w io.Writer, a ...interface{}) (n int, err error)
Fprint formats using the default formats for its operands and writes to w. Spaces are added between operands when neither is a string. It returns the number of bytes written and any write error encountered.
<- https://golang.org/pkg/fmt/#Fpr
func Sprintf
func Sprintf(format string, a ...interface{}) string
Sprintf formats according to a format specifier and returns the resulting string.
<- http://golang.org/pkg/strings/#Reader
func NewReader
func NewReader(s string) *Reader
NewReader returns a new Reader reading from s. It is similar to bytes.NewBufferString but more efficient and read-only.
type Reader
type Reader struct {
// contains filtered or unexported fields
}
A Reader implements the io.Reader, io.ReaderAt, io.Seeker, io.WriterTo, io.ByteScanner, and io.RuneScanner interfaces by reading from a string.
<- http://golang.org/pkg/io/#Reader
type Reader
type Reader interface { Read(p []byte) (n int, err error) }
Reader is the interface that wraps the basic Read method.
ゼロから学ぶGo言語プログラミング(16) A Tour of Go 71~72 - belbomemo