Skip to content

Commit 31e23d2

Browse files
interface{} -> any
1 parent 2784252 commit 31e23d2

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/deployclient/deployclient.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/nais/deploy/pkg/telemetry"
1818
)
1919

20-
type TemplateVariables map[string]interface{}
20+
type TemplateVariables map[string]any
2121

2222
const (
2323
DefaultRef = "master"
@@ -109,12 +109,12 @@ func Prepare(ctx context.Context, cfg *Config) (*pb.DeploymentRequest, error) {
109109
if len(cfg.Environment) == 0 {
110110
log.Infof("Environment not explicitly specified; attempting auto-detection...")
111111

112-
namespaces := make(map[string]interface{})
112+
namespaces := make(map[string]any)
113113
cfg.Environment = cfg.Cluster
114114

115115
for i := range cfg.Resource {
116116
namespace := detectNamespace(resources[i])
117-
namespaces[namespace] = new(interface{})
117+
namespaces[namespace] = new(any)
118118
}
119119

120120
if len(namespaces) == 1 {

pkg/deployclient/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (err *Error) Error() string {
3333
return err.Err.Error()
3434
}
3535

36-
func Errorf(exitCode ExitCode, format string, args ...interface{}) *Error {
36+
func Errorf(exitCode ExitCode, format string, args ...any) *Error {
3737
return &Error{
3838
Code: exitCode,
3939
Err: fmt.Errorf(format, args...),

pkg/deployclient/template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func MultiDocumentFileAsJSON(path string, ctx TemplateVariables) ([]json.RawMess
2525
return nil, fmt.Errorf("%s: %s", path, errMsg)
2626
}
2727

28-
var content interface{}
28+
var content any
2929
messages := make([]json.RawMessage, 0)
3030

3131
decoder := yamlv2.NewDecoder(bytes.NewReader(templated))

0 commit comments

Comments
 (0)