Skip to content

Commit

Permalink
Merge pull request #230 from trheyi/main
Browse files Browse the repository at this point in the history
Refactor Execute method to use named return for error handling
  • Loading branch information
trheyi authored Oct 30, 2024
2 parents e6131b3 + 4faa595 commit 92d908e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func Of(name string, args ...interface{}) (*Process, error) {
}

// Execute execute the process and return error only
func (process *Process) Execute() error {
func (process *Process) Execute() (err error) {
var hd Handler
hd, err := process.handler()
hd, err = process.handler()
if err != nil {
return err
}
Expand Down

0 comments on commit 92d908e

Please sign in to comment.