chore: require go >=1.18, bump deps and get rid of replace directives (#1552)

This commit is contained in:
Lctrs
2023-01-13 08:50:28 -05:00
committed by GitHub
parent d4001c92b2
commit cb41c16bf4
10 changed files with 536 additions and 363 deletions
+3 -4
View File
@@ -20,7 +20,6 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
@@ -79,7 +78,7 @@ func generateHelm(dirName string) error {
/* Create the readme file */
readme := "This chart was created by Kompose\n"
err = ioutil.WriteFile(dirName+string(os.PathSeparator)+"README.md", []byte(readme), 0644)
err = os.WriteFile(dirName+string(os.PathSeparator)+"README.md", []byte(readme), 0644)
if err != nil {
return err
}
@@ -102,7 +101,7 @@ home:
var chartData bytes.Buffer
_ = t.Execute(&chartData, details)
err = ioutil.WriteFile(dirName+string(os.PathSeparator)+"Chart.yaml", chartData.Bytes(), 0644)
err = os.WriteFile(dirName+string(os.PathSeparator)+"Chart.yaml", chartData.Bytes(), 0644)
if err != nil {
return err
}
@@ -839,7 +838,7 @@ func GetEnvsFromFile(file string, opt kobject.ConvertOptions) (map[string]string
// GetContentFromFile gets the content from the file..
func GetContentFromFile(file string) (string, error) {
fileBytes, err := ioutil.ReadFile(file)
fileBytes, err := os.ReadFile(file)
if err != nil {
return "", errors.Wrap(err, "Unable to read file")
}
+1 -2
View File
@@ -19,7 +19,6 @@ package kubernetes
import (
"encoding/base64"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
@@ -267,7 +266,7 @@ func (k *Kubernetes) IntiConfigMapFromFileOrDir(name, cmName, filePath string, s
switch mode := fi.Mode(); {
case mode.IsDir():
files, err := ioutil.ReadDir(filePath)
files, err := os.ReadDir(filePath)
if err != nil {
return nil, err
}
+1 -2
View File
@@ -18,7 +18,6 @@ package transformer
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
@@ -290,7 +289,7 @@ func Print(name, path string, trailing string, data []byte, toStdout, generateJS
} else {
// Write content separately to each file
file = filepath.Join(path, file)
if err := ioutil.WriteFile(file, data, 0644); err != nil {
if err := os.WriteFile(file, data, 0644); err != nil {
return "", errors.Wrap(err, "Failed to write %s: "+trailing)
}
log.Printf("%s file %q created", formatProviderName(provider), file)