Skip to content

Commit

Permalink
Merge pull request goplus#644 from xushiwei/q
Browse files Browse the repository at this point in the history
library: io/ioutil
  • Loading branch information
xushiwei authored Aug 2, 2024
2 parents 0665091 + c186846 commit 0bd2594
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ Here are the Go packages that can be imported correctly:
* [context](https://pkg.go.dev/context)
* [io](https://pkg.go.dev/io)
* [io/fs](https://pkg.go.dev/io/fs)
* [io/ioutil](https://pkg.go.dev/io/ioutil)
* [log](https://pkg.go.dev/log)
* [flag](https://pkg.go.dev/flag)
* [sort](https://pkg.go.dev/sort)
Expand Down
19 changes: 19 additions & 0 deletions _cmptest/ioutildemo/ioutil.go
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit 0bd2594

Please sign in to comment.