Skip to content
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: 2 additions & 1 deletion pkg/cip/audit/auditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"runtime/debug"
Expand Down Expand Up @@ -99,7 +100,7 @@ func (s *ServerContext) RunAuditor() {
// ParsePubSubMessage parses an HTTP request body into a reg.GCRPubSubPayload.
func ParsePubSubMessage(body io.Reader) (*reg.GCRPubSubPayload, error) {
// Handle basic errors (malformed requests).
bodyBytes, err := io.ReadAll(body)
bodyBytes, err := ioutil.ReadAll(body)
if err != nil {
return nil, fmt.Errorf("iotuil.ReadAll: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cip/dockerregistry/grow_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package inventory

import (
"context"
"os"
"io/ioutil"
"path"
"path/filepath"

Expand Down Expand Up @@ -138,7 +138,7 @@ func WriteImages(manifest Manifest, rii RegInvImage) error {
logrus.Infoln("RENDER", imagesPath)

// Write the file.
err := os.WriteFile(
err := ioutil.WriteFile(
imagesPath, []byte(rii.ToYAML(YamlMarshalingOpts{})), 0644)
return err
}
Expand Down
11 changes: 6 additions & 5 deletions pkg/cip/dockerregistry/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
Expand Down Expand Up @@ -131,7 +132,7 @@ func ParseManifestFromFile(filePath string) (Manifest, error) {
var mfest Manifest
var empty Manifest

b, err := os.ReadFile(filePath)
b, err := ioutil.ReadFile(filePath)
if err != nil {
return empty, err
}
Expand All @@ -158,7 +159,7 @@ func ParseThinManifestFromFile(filePath string) (Manifest, error) {
var mfest Manifest
var empty Manifest

b, err := os.ReadFile(filePath)
b, err := ioutil.ReadFile(filePath)
if err != nil {
return empty, err
}
Expand Down Expand Up @@ -196,7 +197,7 @@ func ParseImagesFromFile(filePath string) (Images, error) {
var images Images
var empty Images

b, err := os.ReadFile(filePath)
b, err := ioutil.ReadFile(filePath)
if err != nil {
return empty, err
}
Expand Down Expand Up @@ -318,7 +319,7 @@ func ValidateThinManifestDirectoryStructure(
// For every subfolder in <dir>/manifests, ensure that a
// "promoter-manifest.yaml" file exists, and also that a corresponding file
// exists in the "images" folder.
files, err := os.ReadDir(manifestDir)
files, err := ioutil.ReadDir(manifestDir)
if err != nil {
return err
}
Expand Down Expand Up @@ -1094,7 +1095,7 @@ func getJSONSFromProcess(req stream.ExternalRequest) (cipJson.Objects, Errors) {
)
}

be, err := io.ReadAll(stderrReader)
be, err := ioutil.ReadAll(stderrReader)
if err != nil {
streamErrs = append(
streamErrs,
Expand Down
3 changes: 2 additions & 1 deletion pkg/cip/remotemanifest/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package remotemanifest

import (
"fmt"
"io/ioutil"
"net/url"
"os"
"path/filepath"
Expand Down Expand Up @@ -86,7 +87,7 @@ func cloneToTempDir(
repoURL fmt.Stringer,
branch string,
) (string, error) {
tdir, err := os.MkdirTemp("", "k8s.io-")
tdir, err := ioutil.TempDir("", "k8s.io-")
if err != nil {
return "", err
}
Expand Down