Skip to content

Commit

Permalink
invoke: output values not return values
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisvisco committed Sep 1, 2023
1 parent dde9190 commit 130f4b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ type invokeOptions struct {

// InvokeInfo provides information about an Invoke.
type InvokeInfo struct {
Inputs []*Input
Output []reflect.Value
Inputs []*Input
Outputs []reflect.Value
}

// FillInvokeInfo is an InvokeOption that writes information on the types
Expand Down Expand Up @@ -164,8 +164,8 @@ func (s *Scope) Invoke(function interface{}, opts ...InvokeOption) (err error) {
}

if options.Info != nil {
options.Info.Output = make([]reflect.Value, len(returned))
copy(options.Info.Output, returned)
options.Info.Outputs = make([]reflect.Value, len(returned))
copy(options.Info.Outputs, returned)
}

if last := returned[len(returned)-1]; isError(last.Type()) {
Expand Down

0 comments on commit 130f4b4

Please sign in to comment.