Chore: use any rather than interface{} (#74066)

This commit is contained in:
Ryan McKinley
2023-08-30 18:46:47 +03:00
committed by GitHub
parent 3e272d2bda
commit 025b2f3011
525 changed files with 2528 additions and 2528 deletions
+1 -1
View File
@@ -232,7 +232,7 @@ func getSHA256(u string) ([]byte, error) {
return sha256, nil
}
func postRequest(cfg packaging.PublishConfig, pth string, obj interface{}, descr string) error {
func postRequest(cfg packaging.PublishConfig, pth string, obj any, descr string) error {
var sfx string
switch cfg.Edition {
case config.EditionOSS:
+3 -3
View File
@@ -68,7 +68,7 @@ func VerifyDrone(c *cli.Context) error {
return nil
}
func readConfig(fpath string) ([]map[string]interface{}, error) {
func readConfig(fpath string) ([]map[string]any, error) {
//nolint:gosec
f, err := os.Open(fpath)
if err != nil {
@@ -82,9 +82,9 @@ func readConfig(fpath string) ([]map[string]interface{}, error) {
// The YAML stream may contain multiple pipeline configurations, read them all
dec := yaml.NewDecoder(f)
var c []map[string]interface{}
var c []map[string]any
for {
var m map[string]interface{}
var m map[string]any
if err := dec.Decode(&m); err != nil {
if errors.Is(err, io.EOF) {
break