From 09aae3d950efb35819a9449ce4a8ac7360a2e461 Mon Sep 17 00:00:00 2001 From: Leonardo Di Giovanna Date: Thu, 5 Dec 2024 13:31:48 +0100 Subject: [PATCH] style(decl): replace interface{} with any Signed-off-by: Leonardo Di Giovanna Co-authored-by: Aldo Lacuku --- pkg/test/loader/loader.go | 16 ++++++++-------- pkg/test/step/syscall/base/base.go | 8 ++++---- pkg/test/step/syscall/connect/connect.go | 2 +- pkg/test/step/syscall/dup/dup.go | 2 +- pkg/test/step/syscall/dup2/dup2.go | 2 +- pkg/test/step/syscall/dup2/dup2_arm64.go | 2 +- pkg/test/step/syscall/dup3/dup3.go | 2 +- pkg/test/step/syscall/finitmodule/finitmodule.go | 2 +- pkg/test/step/syscall/initmodule/initmodule.go | 2 +- pkg/test/step/syscall/kill/kill.go | 2 +- pkg/test/step/syscall/link/link.go | 2 +- pkg/test/step/syscall/link/link_arm64.go | 2 +- pkg/test/step/syscall/linkat/linkat.go | 2 +- pkg/test/step/syscall/open/open.go | 2 +- pkg/test/step/syscall/open/open_arm64.go | 2 +- pkg/test/step/syscall/openat/openat.go | 2 +- pkg/test/step/syscall/openat2/openat2.go | 2 +- pkg/test/step/syscall/read/read.go | 2 +- pkg/test/step/syscall/sendto/sendto.go | 2 +- pkg/test/step/syscall/socket/socket.go | 2 +- pkg/test/step/syscall/symlink/symlink.go | 2 +- pkg/test/step/syscall/symlink/symlink_arm64.go | 2 +- pkg/test/step/syscall/symlinkat/symlinkat.go | 2 +- pkg/test/step/syscall/syscall.go | 2 +- pkg/test/step/syscall/write/write.go | 2 +- 25 files changed, 35 insertions(+), 35 deletions(-) diff --git a/pkg/test/loader/loader.go b/pkg/test/loader/loader.go index e55fd6c6..8fff902f 100644 --- a/pkg/test/loader/loader.go +++ b/pkg/test/loader/loader.go @@ -244,7 +244,7 @@ func (r *TestResource) UnmarshalYAML(node *yaml.Node) error { // marshal the content. // TODO: this method should be implemented with a pointer receiver but unfortunately, the yaml.v3 library is only able // to call it if it is implemented with a value receiver. Uniform the receivers once the library is replaced. -func (r TestResource) MarshalYAML() (interface{}, error) { +func (r TestResource) MarshalYAML() (any, error) { switch resourceType := r.Type; resourceType { case TestResourceTypeClientServer: return struct { @@ -271,7 +271,7 @@ func (r TestResource) MarshalYAML() (interface{}, error) { // provide an addition MarshalYAML method for TestResourceFDSpec, as it will not be called by the library if the Spec // field specify "inline" (as it should be in our case). Take care of replace this with a more elegant solution once // yaml.v3 is replaced. -func (r *TestResource) marshalFD() (interface{}, error) { +func (r *TestResource) marshalFD() (any, error) { spec := r.Spec.(*TestResourceFDSpec) subSpec := spec.Spec switch subtype := spec.Subtype; subtype { @@ -592,11 +592,11 @@ func (s *TestStep) UnmarshalYAML(node *yaml.Node) error { // marshal the content. // TODO: this method should be implemented with a pointer receiver but unfortunately, the yaml.v3 library is only able // to call it if it is implemented with a value receiver. Uniform the receivers once the library is replaced. -func (s TestStep) MarshalYAML() (interface{}, error) { +func (s TestStep) MarshalYAML() (any, error) { switch stepType := s.Type; stepType { case TestStepTypeSyscall: spec := s.Spec.(*TestStepSyscallSpec) - args := make(map[string]interface{}, len(spec.Args)+len(s.FieldBindings)) + args := make(map[string]any, len(spec.Args)+len(s.FieldBindings)) for arg, argValue := range spec.Args { args[arg] = argValue } @@ -640,8 +640,8 @@ func (t *TestStepType) UnmarshalYAML(node *yaml.Node) error { // TestStepSyscallSpec describes a system call test step. type TestStepSyscallSpec struct { - Syscall SyscallName `yaml:"syscall" validate:"-"` - Args map[string]interface{} `yaml:"args" validate:"required"` + Syscall SyscallName `yaml:"syscall" validate:"-"` + Args map[string]any `yaml:"args" validate:"required"` } // TestStepFieldBinding contains the information to perform the binding of a field belonging to a source step. @@ -653,7 +653,7 @@ type TestStepFieldBinding struct { var fieldBindingRegex = regexp.MustCompile(`^\${(.+?)\.(.+)}$`) -func getFieldBindings(containingArgName string, args map[string]interface{}) []*TestStepFieldBinding { +func getFieldBindings(containingArgName string, args map[string]any) []*TestStepFieldBinding { // The prefix of each contained argument is composed by the containing argument name. var argsPrefix string if containingArgName != "" { @@ -678,7 +678,7 @@ func getFieldBindings(containingArgName string, args map[string]interface{}) []* // If an argument value is a field binding, remove it from arguments. delete(args, arg) - case map[string]interface{}: + case map[string]any: bindings = append(bindings, getFieldBindings(arg, argValue)...) } } diff --git a/pkg/test/step/syscall/base/base.go b/pkg/test/step/syscall/base/base.go index 8686c999..bf307b7c 100644 --- a/pkg/test/step/syscall/base/base.go +++ b/pkg/test/step/syscall/base/base.go @@ -60,7 +60,7 @@ var _ syscall.Syscall = (*baseSyscall)(nil) var errOpenModeMustBePositive = fmt.Errorf("open mode must be a positive integer") // New creates a new generic system call test step. -func New(stepName string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding, argsContainer, +func New(stepName string, rawArgs map[string]any, fieldBindings []*step.FieldBinding, argsContainer, bindOnlyArgsContainer, retValueContainer reflect.Value, defaultedArgs []string, runFunc, cleanupFunc func(ctx context.Context) error) (syscall.Syscall, error) { if err := checkContainersInvariants(argsContainer, bindOnlyArgsContainer, retValueContainer); err != nil { @@ -123,7 +123,7 @@ func checkContainersInvariants(argsContainer, bindOnlyArgsContainer, retValueCon // setArgFieldValues sets the argument fields in argFieldContainer to the corresponding values in rawArgs. It returns // the list of set arguments field paths. -func setArgFieldValues(argFieldContainer reflect.Value, rawArgs map[string]interface{}) ([]string, error) { +func setArgFieldValues(argFieldContainer reflect.Value, rawArgs map[string]any) ([]string, error) { fmt.Printf("setArgFieldValues rawArgs: %+v\n", rawArgs) var boundArgs []string for rawArg, rawArgValue := range rawArgs { @@ -146,7 +146,7 @@ func setArgFieldValues(argFieldContainer reflect.Value, rawArgs map[string]inter // depending on the field type. // //nolint:gocyclo // Disable cyclomatic complexity check. -func setArgFieldValue(argField *field.Field, value interface{}) ([]string, error) { +func setArgFieldValue(argField *field.Field, value any) ([]string, error) { boundArgs := []string{argField.Path} argFieldValue := argField.Value switch argFieldType := argField.Type; argFieldType { @@ -280,7 +280,7 @@ func setArgFieldValue(argField *field.Field, value interface{}) ([]string, error return boundArgs, nil } -func setSubArgFieldValues(argField *field.Field, value interface{}) ([]string, error) { +func setSubArgFieldValues(argField *field.Field, value any) ([]string, error) { rawArgs, err := parseMap(value) if err != nil { return nil, fmt.Errorf("cannot parse argument field: %w", err) diff --git a/pkg/test/step/syscall/connect/connect.go b/pkg/test/step/syscall/connect/connect.go index f185fb93..c8f44c8d 100644 --- a/pkg/test/step/syscall/connect/connect.go +++ b/pkg/test/step/syscall/connect/connect.go @@ -38,7 +38,7 @@ type connectSyscall struct { } // New creates a new connect system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { c := &connectSyscall{} argsContainer := reflect.ValueOf(&c.args).Elem() bindOnlyArgsContainer := reflect.ValueOf(&c.bindOnlyArgs).Elem() diff --git a/pkg/test/step/syscall/dup/dup.go b/pkg/test/step/syscall/dup/dup.go index 1dee87d8..8064e06d 100644 --- a/pkg/test/step/syscall/dup/dup.go +++ b/pkg/test/step/syscall/dup/dup.go @@ -37,7 +37,7 @@ type dupSyscall struct { } // New creates a new dup system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { d := &dupSyscall{} argsContainer := reflect.ValueOf(&d.args).Elem() bindOnlyArgsContainer := reflect.ValueOf(&d.bindOnlyArgs).Elem() diff --git a/pkg/test/step/syscall/dup2/dup2.go b/pkg/test/step/syscall/dup2/dup2.go index 2b2353d2..3307b529 100644 --- a/pkg/test/step/syscall/dup2/dup2.go +++ b/pkg/test/step/syscall/dup2/dup2.go @@ -42,7 +42,7 @@ type dup2Syscall struct { } // New creates a new dup2 system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { d := &dup2Syscall{savedFD: -1} argsContainer := reflect.ValueOf(&d.args).Elem() bindOnlyArgsContainer := reflect.ValueOf(&d.bindOnlyArgs).Elem() diff --git a/pkg/test/step/syscall/dup2/dup2_arm64.go b/pkg/test/step/syscall/dup2/dup2_arm64.go index b3e07bef..7009e064 100644 --- a/pkg/test/step/syscall/dup2/dup2_arm64.go +++ b/pkg/test/step/syscall/dup2/dup2_arm64.go @@ -22,6 +22,6 @@ import ( "github.com/falcosecurity/event-generator/pkg/test/step/syscall" ) -func New(_ string, _ map[string]interface{}, _ []*step.FieldBinding) (syscall.Syscall, error) { +func New(_ string, _ map[string]any, _ []*step.FieldBinding) (syscall.Syscall, error) { return nil, fmt.Errorf("not supported by the architecture") } diff --git a/pkg/test/step/syscall/dup3/dup3.go b/pkg/test/step/syscall/dup3/dup3.go index f3781c4a..a36012ba 100644 --- a/pkg/test/step/syscall/dup3/dup3.go +++ b/pkg/test/step/syscall/dup3/dup3.go @@ -41,7 +41,7 @@ type dup3Syscall struct { } // New creates a new dup3 system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { d := &dup3Syscall{savedFD: -1} // d.args.Flags defaulted to 0 argsContainer := reflect.ValueOf(&d.args).Elem() diff --git a/pkg/test/step/syscall/finitmodule/finitmodule.go b/pkg/test/step/syscall/finitmodule/finitmodule.go index 33da0a28..a25fdbb4 100644 --- a/pkg/test/step/syscall/finitmodule/finitmodule.go +++ b/pkg/test/step/syscall/finitmodule/finitmodule.go @@ -40,7 +40,7 @@ type finitModuleSyscall struct { } // New creates a new finit_module system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { f := &finitModuleSyscall{} // f.args.ParamValues defaulted to "" // f.args.Flags defaulted to 0 diff --git a/pkg/test/step/syscall/initmodule/initmodule.go b/pkg/test/step/syscall/initmodule/initmodule.go index 21d000ed..c26b73aa 100644 --- a/pkg/test/step/syscall/initmodule/initmodule.go +++ b/pkg/test/step/syscall/initmodule/initmodule.go @@ -38,7 +38,7 @@ type initModuleSyscall struct { } // New creates a new init_module system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { i := &initModuleSyscall{} // i.args.ParamValues defaulted to "" argsContainer := reflect.ValueOf(&i.args).Elem() diff --git a/pkg/test/step/syscall/kill/kill.go b/pkg/test/step/syscall/kill/kill.go index db45c77b..06cffb6b 100644 --- a/pkg/test/step/syscall/kill/kill.go +++ b/pkg/test/step/syscall/kill/kill.go @@ -39,7 +39,7 @@ type killSyscall struct { } // New creates a new kill system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { k := &killSyscall{} argsContainer := reflect.ValueOf(&k.args).Elem() bindOnlyArgsContainer := reflect.ValueOf(&k.bindOnlyArgs).Elem() diff --git a/pkg/test/step/syscall/link/link.go b/pkg/test/step/syscall/link/link.go index 0a163897..b39b1954 100644 --- a/pkg/test/step/syscall/link/link.go +++ b/pkg/test/step/syscall/link/link.go @@ -43,7 +43,7 @@ type linkSyscall struct { } // New creates a new link system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { l := &linkSyscall{} argsContainer := reflect.ValueOf(&l.args).Elem() bindOnlyArgsContainer := reflect.ValueOf(&l.bindOnlyArgs).Elem() diff --git a/pkg/test/step/syscall/link/link_arm64.go b/pkg/test/step/syscall/link/link_arm64.go index d1f82c3c..6287e111 100644 --- a/pkg/test/step/syscall/link/link_arm64.go +++ b/pkg/test/step/syscall/link/link_arm64.go @@ -22,6 +22,6 @@ import ( "github.com/falcosecurity/event-generator/pkg/test/step/syscall" ) -func New(_ string, _ map[string]interface{}, _ []*step.FieldBinding) (syscall.Syscall, error) { +func New(_ string, _ map[string]any, _ []*step.FieldBinding) (syscall.Syscall, error) { return nil, fmt.Errorf("not supported by the architecture") } diff --git a/pkg/test/step/syscall/linkat/linkat.go b/pkg/test/step/syscall/linkat/linkat.go index 42a76b48..1b742d0e 100644 --- a/pkg/test/step/syscall/linkat/linkat.go +++ b/pkg/test/step/syscall/linkat/linkat.go @@ -45,7 +45,7 @@ type linkAtSyscall struct { } // New creates a new linkat system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { l := &linkAtSyscall{} l.bindOnlyArgs.OldDirFD = unix.AT_FDCWD l.bindOnlyArgs.NewDirFD = unix.AT_FDCWD diff --git a/pkg/test/step/syscall/open/open.go b/pkg/test/step/syscall/open/open.go index 909c44c3..27703745 100644 --- a/pkg/test/step/syscall/open/open.go +++ b/pkg/test/step/syscall/open/open.go @@ -42,7 +42,7 @@ type openSyscall struct { } // New creates a new open system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { o := &openSyscall{} // o.args.Mode defaulted to 0 argsContainer := reflect.ValueOf(&o.args).Elem() diff --git a/pkg/test/step/syscall/open/open_arm64.go b/pkg/test/step/syscall/open/open_arm64.go index 80db5e23..5003cef0 100644 --- a/pkg/test/step/syscall/open/open_arm64.go +++ b/pkg/test/step/syscall/open/open_arm64.go @@ -22,6 +22,6 @@ import ( "github.com/falcosecurity/event-generator/pkg/test/step/syscall" ) -func New(_ string, _ map[string]interface{}, _ []*step.FieldBinding) (syscall.Syscall, error) { +func New(_ string, _ map[string]any, _ []*step.FieldBinding) (syscall.Syscall, error) { return nil, fmt.Errorf("not supported by the architecture") } diff --git a/pkg/test/step/syscall/openat/openat.go b/pkg/test/step/syscall/openat/openat.go index e43346a7..b1ff2dd1 100644 --- a/pkg/test/step/syscall/openat/openat.go +++ b/pkg/test/step/syscall/openat/openat.go @@ -42,7 +42,7 @@ type openAtSyscall struct { } // New creates a new openat system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { o := &openAtSyscall{} o.bindOnlyArgs.DirFD = unix.AT_FDCWD // o.args.Mode defaulted to 0 diff --git a/pkg/test/step/syscall/openat2/openat2.go b/pkg/test/step/syscall/openat2/openat2.go index fc8a6dcf..99ba8ee9 100644 --- a/pkg/test/step/syscall/openat2/openat2.go +++ b/pkg/test/step/syscall/openat2/openat2.go @@ -46,7 +46,7 @@ type openAt2Syscall struct { } // New creates a new openat2 system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { o := &openAt2Syscall{} o.bindOnlyArgs.DirFD = unix.AT_FDCWD // o.args.How field defaulted to empty struct. diff --git a/pkg/test/step/syscall/read/read.go b/pkg/test/step/syscall/read/read.go index 99061ddd..a77aa911 100644 --- a/pkg/test/step/syscall/read/read.go +++ b/pkg/test/step/syscall/read/read.go @@ -39,7 +39,7 @@ type readSyscall struct { } // New creates a new read system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { r := &readSyscall{} argsContainer := reflect.ValueOf(&r.args).Elem() bindOnlyArgsContainer := reflect.ValueOf(&r.bindOnlyArgs).Elem() diff --git a/pkg/test/step/syscall/sendto/sendto.go b/pkg/test/step/syscall/sendto/sendto.go index f818c87c..40cb401c 100644 --- a/pkg/test/step/syscall/sendto/sendto.go +++ b/pkg/test/step/syscall/sendto/sendto.go @@ -45,7 +45,7 @@ type sendToSyscall struct { } // New creates a new sendto system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { s := &sendToSyscall{} // s.args.Len defaults to the buffer length at run time, if unbound. argsContainer := reflect.ValueOf(&s.args).Elem() diff --git a/pkg/test/step/syscall/socket/socket.go b/pkg/test/step/syscall/socket/socket.go index 9c7a1041..fa1196d5 100644 --- a/pkg/test/step/syscall/socket/socket.go +++ b/pkg/test/step/syscall/socket/socket.go @@ -39,7 +39,7 @@ type socketSyscall struct { } // New creates a new socket system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { s := &socketSyscall{} argsContainer := reflect.ValueOf(&s.args).Elem() bindOnlyArgsContainer := reflect.ValueOf(&s.bindOnlyArgs).Elem() diff --git a/pkg/test/step/syscall/symlink/symlink.go b/pkg/test/step/syscall/symlink/symlink.go index f2b37850..6b94e5ec 100644 --- a/pkg/test/step/syscall/symlink/symlink.go +++ b/pkg/test/step/syscall/symlink/symlink.go @@ -43,7 +43,7 @@ type symlinkSyscall struct { } // New creates a new symlink system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { s := &symlinkSyscall{} argsContainer := reflect.ValueOf(&s.args).Elem() bindOnlyArgsContainer := reflect.ValueOf(&s.bindOnlyArgs).Elem() diff --git a/pkg/test/step/syscall/symlink/symlink_arm64.go b/pkg/test/step/syscall/symlink/symlink_arm64.go index c57fee12..0fcc9fb2 100644 --- a/pkg/test/step/syscall/symlink/symlink_arm64.go +++ b/pkg/test/step/syscall/symlink/symlink_arm64.go @@ -22,6 +22,6 @@ import ( "github.com/falcosecurity/event-generator/pkg/test/step/syscall" ) -func New(_ string, _ map[string]interface{}, _ []*step.FieldBinding) (syscall.Syscall, error) { +func New(_ string, _ map[string]any, _ []*step.FieldBinding) (syscall.Syscall, error) { return nil, fmt.Errorf("not supported by the architecture") } diff --git a/pkg/test/step/syscall/symlinkat/symlinkat.go b/pkg/test/step/syscall/symlinkat/symlinkat.go index 19b63498..f3ce1ede 100644 --- a/pkg/test/step/syscall/symlinkat/symlinkat.go +++ b/pkg/test/step/syscall/symlinkat/symlinkat.go @@ -43,7 +43,7 @@ type symlinkAtSyscall struct { } // New creates a new symlinkat system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { s := &symlinkAtSyscall{} s.bindOnlyArgs.NewDirFD = unix.AT_FDCWD argsContainer := reflect.ValueOf(&s.args).Elem() diff --git a/pkg/test/step/syscall/syscall.go b/pkg/test/step/syscall/syscall.go index 2421040e..0766887c 100644 --- a/pkg/test/step/syscall/syscall.go +++ b/pkg/test/step/syscall/syscall.go @@ -74,6 +74,6 @@ const ( // Description contains information to build a new Syscall test step. type Description struct { - RawArgs map[string]interface{} + RawArgs map[string]any FieldBindings []*step.FieldBinding } diff --git a/pkg/test/step/syscall/write/write.go b/pkg/test/step/syscall/write/write.go index 4871e3ec..d29bd6ab 100644 --- a/pkg/test/step/syscall/write/write.go +++ b/pkg/test/step/syscall/write/write.go @@ -39,7 +39,7 @@ type writeSyscall struct { } // New creates a new write system call test step. -func New(name string, rawArgs map[string]interface{}, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { +func New(name string, rawArgs map[string]any, fieldBindings []*step.FieldBinding) (syscall.Syscall, error) { w := &writeSyscall{} // w.args.Len defaults to the buffer length at run time, if unbound. argsContainer := reflect.ValueOf(&w.args).Elem()