library: io/ioutil

This commit is contained in:
xushiwei
2024-08-02 14:26:13 +08:00
parent 688d153427
commit 5f92c3b3fc

View File

@@ -0,0 +1,19 @@
package main
import (
"fmt"
"io/ioutil"
"log"
"strings"
)
func main() {
r := strings.NewReader("Go is a general-purpose language designed with systems programming in mind.")
b, err := ioutil.ReadAll(r)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", b)
}