Skip to content

Commit e52bf33

Browse files
committed
cleanup.go: io/ioutil" has been deprecated since Go 1.16
1 parent bfeca3f commit e52bf33

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cleanup.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ package main
44

55
import (
66
"go/format"
7-
"io/ioutil"
87
"log"
98
"os"
109
"path/filepath"
@@ -23,7 +22,7 @@ func main() {
2322
failOnError(err)
2423

2524
for _, name := range matches {
26-
src, err := ioutil.ReadFile(name)
25+
src, err := os.ReadFile(name)
2726
failOnError(err)
2827

2928
// remove comments used by AsciiDoctor
@@ -35,7 +34,7 @@ func main() {
3534
failOnError(err)
3635

3736
// write it back out
38-
failOnError(ioutil.WriteFile(name, src, 0644))
37+
failOnError(os.WriteFile(name, src, 0644))
3938
}
4039
}
4140

0 commit comments

Comments
 (0)