Release new helm chart with certgen fixed (#7478)
* Update go version, modules and remove ioutil * Release new helm chart with certgen fixed
This commit is contained in:
parent
fd8687c648
commit
f973f3ffda
40 changed files with 794 additions and 614 deletions
|
|
@ -24,7 +24,6 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"math/rand" // #nosec
|
||||
"net"
|
||||
"net/url"
|
||||
|
|
@ -77,7 +76,7 @@ type Template struct {
|
|||
//NewTemplate returns a new Template instance or an
|
||||
//error if the specified template file contains errors
|
||||
func NewTemplate(file string) (*Template, error) {
|
||||
data, err := ioutil.ReadFile(file)
|
||||
data, err := os.ReadFile(file)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "unexpected error reading template %v", file)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import (
|
|||
"bytes"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"path"
|
||||
|
|
@ -479,7 +478,7 @@ func TestTemplateWithData(t *testing.T) {
|
|||
t.Errorf("unexpected error reading json file: %v", err)
|
||||
}
|
||||
defer f.Close()
|
||||
data, err := ioutil.ReadFile(f.Name())
|
||||
data, err := os.ReadFile(f.Name())
|
||||
if err != nil {
|
||||
t.Error("unexpected error reading json file: ", err)
|
||||
}
|
||||
|
|
@ -523,7 +522,7 @@ func BenchmarkTemplateWithData(b *testing.B) {
|
|||
b.Errorf("unexpected error reading json file: %v", err)
|
||||
}
|
||||
defer f.Close()
|
||||
data, err := ioutil.ReadFile(f.Name())
|
||||
data, err := os.ReadFile(f.Name())
|
||||
if err != nil {
|
||||
b.Error("unexpected error reading json file: ", err)
|
||||
}
|
||||
|
|
@ -1744,7 +1743,7 @@ func TestCleanConf(t *testing.T) {
|
|||
}
|
||||
actual := &bytes.Buffer{}
|
||||
{
|
||||
data, err := ioutil.ReadFile(testDataDir + "/cleanConf.src.conf")
|
||||
data, err := os.ReadFile(testDataDir + "/cleanConf.src.conf")
|
||||
if err != nil {
|
||||
t.Error("unexpected error reading conf file: ", err)
|
||||
}
|
||||
|
|
@ -1755,7 +1754,7 @@ func TestCleanConf(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
expected, err := ioutil.ReadFile(testDataDir + "/cleanConf.expected.conf")
|
||||
expected, err := os.ReadFile(testDataDir + "/cleanConf.expected.conf")
|
||||
if err != nil {
|
||||
t.Error("unexpected error reading conf file: ", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue