June 2017
Beginner
1091 pages
22h 9m
English
The obvious place to start with IO is, well, the io package (https://golang.org/pkg/io). As we have already seen, the io package defines input and output primitives as the io.Reader and io.Writer interfaces. The following table summarizes additional functions and types, available in the io package, that facilitate streaming IO operations.
|
Function |
Description |
|
|
The data := strings.NewReader("Write me down.")
file, _ := os.Create("./iocopy.data")
io.Copy(file, data)
golang.fyi/ch10/iocopy.go |
|
|
Read now
Unlock full access