chore(deps): Replace io/ioutil package (#4494)

* update all deprecated ioutil usages

* forgotten changes

* add missing imports

* undo changing comment

* add missing 'os' import

* fix integration test

---------

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
This commit is contained in:
Jordi van Liempt
2023-08-16 12:57:04 +02:00
committed by GitHub
co-authored by I557621 Gulom Alimov
parent 69347fe2af
commit 0ba4c2206c
162 changed files with 566 additions and 657 deletions
+2 -3
View File
@@ -7,7 +7,6 @@
package main
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
@@ -37,10 +36,10 @@ func TestGitHubIntegrationPiperPublishRelease(t *testing.T) {
dir := t.TempDir()
testAsset := filepath.Join(dir, "test.txt")
err := ioutil.WriteFile(testAsset, []byte("Test"), 0644)
err := os.WriteFile(testAsset, []byte("Test"), 0644)
assert.NoError(t, err, "Error when writing temporary file")
test2Asset := filepath.Join(dir, "test2.txt")
err = ioutil.WriteFile(test2Asset, []byte("Test"), 0644)
err = os.WriteFile(test2Asset, []byte("Test"), 0644)
assert.NoError(t, err, "Error when writing temporary file")
t.Run("test single asset - success", func(t *testing.T) {