From ad8706382ed4b12f06ca67ceb134f27596153df4 Mon Sep 17 00:00:00 2001 From: Anoop S <40671157+anoop142@users.noreply.github.com> Date: Mon, 20 Nov 2023 23:43:04 +0530 Subject: [PATCH] ioutil deprecations fix (#52) * fix missing os package import * fix: proper replacement for ioutil TempDir --- govarnam/govarnam_ml_test.go | 1 + govarnam/govarnam_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/govarnam/govarnam_ml_test.go b/govarnam/govarnam_ml_test.go index ae32a7b..877de53 100644 --- a/govarnam/govarnam_ml_test.go +++ b/govarnam/govarnam_ml_test.go @@ -3,6 +3,7 @@ package govarnam import ( "context" "log" + "os" "path" "strings" "testing" diff --git a/govarnam/govarnam_test.go b/govarnam/govarnam_test.go index 06b6b67..6400584 100644 --- a/govarnam/govarnam_test.go +++ b/govarnam/govarnam_test.go @@ -103,7 +103,7 @@ func TestMain(m *testing.M) { log.Fatal(err) } - testTempDir, err = os.TempDir("", "govarnam_test") + testTempDir, err = os.MkdirTemp("", "govarnam_test") checkError(err) for _, schemeDetail := range schemeDetails {