diff --git a/pkg/cip/audit/auditor.go b/pkg/cip/audit/auditor.go index ecb4117458a..fca01d10533 100644 --- a/pkg/cip/audit/auditor.go +++ b/pkg/cip/audit/auditor.go @@ -20,6 +20,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "os" "runtime/debug" @@ -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) } diff --git a/pkg/cip/dockerregistry/grow_manifest.go b/pkg/cip/dockerregistry/grow_manifest.go index 93689605fd9..eedb3c20ad9 100644 --- a/pkg/cip/dockerregistry/grow_manifest.go +++ b/pkg/cip/dockerregistry/grow_manifest.go @@ -18,7 +18,7 @@ package inventory import ( "context" - "os" + "io/ioutil" "path" "path/filepath" @@ -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 } diff --git a/pkg/cip/dockerregistry/inventory.go b/pkg/cip/dockerregistry/inventory.go index e44f85bba01..1baa37b974d 100644 --- a/pkg/cip/dockerregistry/inventory.go +++ b/pkg/cip/dockerregistry/inventory.go @@ -20,6 +20,7 @@ import ( "encoding/json" "fmt" "io" + "io/ioutil" "net/http" "os" "path/filepath" @@ -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 } @@ -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 } @@ -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 } @@ -318,7 +319,7 @@ func ValidateThinManifestDirectoryStructure( // For every subfolder in