Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove refs to deprecated io/ioutil #113

Merged
merged 1 commit into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions hcl_writer_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand All @@ -24,7 +23,7 @@ func init() {

func testLoadFile(t *testing.T, fileparts ...string) string {
filename := filepath.Join(fileparts...)
content, err := ioutil.ReadFile(filename)
content, err := os.ReadFile(filename)
if err != nil {
t.Fatalf("failed to load test file, %s: %v", filename, err)
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/file_io/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package file_io
import (
"bufio"
"bytes"
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -82,7 +81,7 @@ func readFilesInput(input string) []runtime.Object {

readFile := func(fileName string) {
log.Debug().Msgf("reading file: %s", fileName)
content, err := ioutil.ReadFile(fileName)
content, err := os.ReadFile(fileName)
if err != nil {
log.Fatal().Err(err).Msg("could not read file")
}
Expand Down
Loading