Skip to content

Commit

Permalink
prog: Run: allow passing nil RunOptions
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Beckers <[email protected]>
  • Loading branch information
ti-mo committed Sep 26, 2024
1 parent 67e4969 commit a22a1cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions prog.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,10 @@ func (p *Program) Test(in []byte) (uint32, []byte, error) {
//
// Note: the same restrictions from Test apply.
func (p *Program) Run(opts *RunOptions) (uint32, error) {
if opts == nil {
opts = &RunOptions{}
}

ret, _, err := p.run(opts)
if err != nil {
return ret, fmt.Errorf("run program: %w", err)
Expand Down

0 comments on commit a22a1cd

Please sign in to comment.