Skip to content

Commit a22a1cd

Browse files
committed
prog: Run: allow passing nil RunOptions
Signed-off-by: Timo Beckers <[email protected]>
1 parent 67e4969 commit a22a1cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

prog.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,10 @@ func (p *Program) Test(in []byte) (uint32, []byte, error) {
692692
//
693693
// Note: the same restrictions from Test apply.
694694
func (p *Program) Run(opts *RunOptions) (uint32, error) {
695+
if opts == nil {
696+
opts = &RunOptions{}
697+
}
698+
695699
ret, _, err := p.run(opts)
696700
if err != nil {
697701
return ret, fmt.Errorf("run program: %w", err)

0 commit comments

Comments
 (0)