From e1d07faa59f4399fa28a79b9788b0c3a03075908 Mon Sep 17 00:00:00 2001 From: Michael Henry Pantaleon Date: Tue, 7 Mar 2023 21:36:38 +1100 Subject: [PATCH] [fix] deprecation warning --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 8800714..f79b476 100644 --- a/main.go +++ b/main.go @@ -3,8 +3,8 @@ package main import ( "flag" "fmt" - "io/ioutil" "michaelhenry/envject/parser" + "os" ) @@ -16,7 +16,7 @@ func main() { flag.Parse() // Load the file contents - fileBytes, err := ioutil.ReadFile(*sourcePath) + fileBytes, err := os.ReadFile(*sourcePath) if err != nil { fmt.Println(err) return @@ -35,7 +35,7 @@ func main() { } // Write the updated content to the output file - err = ioutil.WriteFile(*outputPath, []byte(updatedContent), 0644) + err = os.WriteFile(*outputPath, []byte(updatedContent), 0644) if err != nil { fmt.Println(err) return