18 lines
241 B
Go
18 lines
241 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
"log"
|
||
|
"os"
|
||
|
"strings"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
r := strings.NewReader("some io.Reader stream to be read\n")
|
||
|
s := io.NewSectionReader(r, 5, 17)
|
||
|
|
||
|
if _, err := io.Copy(os.Stdout, s); err != nil {
|
||
|
log.Fatal(err)
|
||
|
}
|
||
|
}
|