Replace interface{} by any (#901)

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-06-16 10:49:05 +09:00
committed by GitHub
parent 94fe519ed5
commit c55fa0f765
46 changed files with 394 additions and 394 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ type Bus struct {
Logger *zap.SugaredLogger
}
func (bus *Bus) Trigger(evt string, evtErr error, context map[string]interface{}) (bool, error) {
func (bus *Bus) Trigger(evt string, evtErr error, context map[string]any) (bool, error) {
if bus.Runner == nil {
bus.Runner = helmexec.ShellRunner{
Dir: bus.BasePath,
@@ -94,7 +94,7 @@ func (bus *Bus) Trigger(evt string, evtErr error, context map[string]interface{}
bus.Logger.Debugf("hook[%s]: stateFilePath=%s, basePath=%s\n", name, bus.StateFilePath, bus.BasePath)
data := map[string]interface{}{
data := map[string]any{
"Environment": bus.Env,
"Namespace": bus.Namespace,
"Event": event{
+1 -1
View File
@@ -159,7 +159,7 @@ func TestTrigger(t *testing.T) {
}
bus.Runner = &runner{}
data := map[string]interface{}{
data := map[string]any{
"Release": "myrel",
"HelmfileCommand": "mycmd",
}