Skip to content

Commit 4ac4229

Browse files
authored
Merge pull request #59 from Borwe/refactor
io/ioutils deprecated after 1.16 use os
2 parents 5f8c641 + 597fe13 commit 4ac4229

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"fmt"
5-
"io/ioutil"
65
"os"
76
"strings"
87

@@ -58,7 +57,7 @@ func main() {
5857
file := args[1]
5958

6059
if strings.HasSuffix(file, "nr") || strings.HasSuffix(file, ".sw") {
61-
contents, err := ioutil.ReadFile(file)
60+
contents, err := os.ReadFile(file)
6261
if err != nil {
6362
fmt.Println(styles.ErrorStyle.Render("Error: Nuru imeshindwa kusoma faili: ", args[1]))
6463
os.Exit(0)

0 commit comments

Comments
 (0)