aboutsummaryrefslogtreecommitdiff
path: root/lib/parser/parser.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-04-06 01:40:07 +0700
committerShulhan <ms@kilabit.info>2022-04-06 02:37:22 +0700
commit429a9d9205bad2be34cdfe7fb5b1a9a6f127f541 (patch)
tree1debf749d60e00a5ac03a3fecc6960aead0ad236 /lib/parser/parser.go
parent7186de3415b130a6c67388d8f1bcf54404f6202b (diff)
downloadpakakeh.go-429a9d9205bad2be34cdfe7fb5b1a9a6f127f541.tar.xz
all: replace any usage of ioutil package with os or io
Since Go 1.16, the ioutil package has been deprecated. This changes replace any usage that use functions from ioutil package with their replacement from package os or package io.
Diffstat (limited to 'lib/parser/parser.go')
-rw-r--r--lib/parser/parser.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/parser/parser.go b/lib/parser/parser.go
index 33897ba7..23beeedb 100644
--- a/lib/parser/parser.go
+++ b/lib/parser/parser.go
@@ -9,7 +9,7 @@ package parser
import (
"fmt"
- "io/ioutil"
+ "os"
libascii "github.com/shuLhan/share/lib/ascii"
)
@@ -56,7 +56,7 @@ func New(content, delims string) (p *Parser) {
// If delimiters is empty, it would default to all whitespaces characters.
//
func Open(file, delims string) (p *Parser, err error) {
- v, err := ioutil.ReadFile(file)
+ v, err := os.ReadFile(file)
if err != nil {
return nil, err
}