Skip to content

Commit

Permalink
remove deprecated use of ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksnyder committed Dec 5, 2023
1 parent 0cc0111 commit 5257e26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions v2/i18n/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package i18n

import (
"fmt"
"io/ioutil"
"os"

"github.com/nicksnyder/go-i18n/v2/internal/plural"

Expand Down Expand Up @@ -52,7 +52,7 @@ func (b *Bundle) RegisterUnmarshalFunc(format string, unmarshalFunc UnmarshalFun
// LoadMessageFile loads the bytes from path
// and then calls ParseMessageFileBytes.
func (b *Bundle) LoadMessageFile(path string) (*MessageFile, error) {
buf, err := ioutil.ReadFile(path)
buf, err := os.ReadFile(path)
if err != nil {
return nil, err
}
Expand Down
3 changes: 1 addition & 2 deletions v2/internal/plural/codegen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/xml"
"flag"
"fmt"
"io/ioutil"
"os"
"text/template"
)
Expand All @@ -29,7 +28,7 @@ func main() {
flag.BoolVar(&verbose, "v", false, "verbose output")
flag.Parse()

buf, err := ioutil.ReadFile(in)
buf, err := os.ReadFile(in)
if err != nil {
fatalf("failed to read file: %s", err)
}
Expand Down

0 comments on commit 5257e26

Please sign in to comment.