Skip to content

Commit

Permalink
cmd/kepubify: Replace ioutil with os for Go 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
pgaskin committed Jul 2, 2021
1 parent 948788e commit 1031fd2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/kepubify/pathtransform_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"io/ioutil"
"os"
"path/filepath"
"reflect"
Expand Down Expand Up @@ -675,7 +674,7 @@ func (tc transformPathsCase) Run(t *testing.T) {
t.Log("===\n")
t.Logf("case %#v", tc.What)

td, err := ioutil.TempDir("", "kepubify-test")
td, err := os.MkdirTemp("", "kepubify-test")
if err != nil {
panic(err)
}
Expand All @@ -696,7 +695,7 @@ func (tc transformPathsCase) Run(t *testing.T) {
if err := os.MkdirAll(filepath.Dir(in), 0755); err != nil {
panic(err)
}
if err := ioutil.WriteFile(fn, []byte(in), 0644); err != nil {
if err := os.WriteFile(fn, []byte(in), 0644); err != nil {
panic(err)
}
}
Expand Down

0 comments on commit 1031fd2

Please sign in to comment.