Skip to content

Commit

Permalink
Removed usage of deprecated io/ioutil module.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswdr committed Nov 19, 2023
1 parent 48d2fba commit e4c4675
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions utils.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package faker

import (
"io/ioutil"
"net/http"
"os"
"runtime"
Expand Down Expand Up @@ -41,7 +40,7 @@ type TempFileCreatorImpl struct{}

// TempFile creates a temporary file
func (TempFileCreatorImpl) TempFile(prefix string) (f *os.File, err error) {
return ioutil.TempFile(os.TempDir(), prefix)
return os.CreateTemp(os.TempDir(), prefix)
}

// OSResolver returns the GOOS value for operating an operating system
Expand Down

0 comments on commit e4c4675

Please sign in to comment.