Skip to content

Commit

Permalink
Improves ImportResolver example (#2299)
Browse files Browse the repository at this point in the history
Signed-off-by: Bjørn Erik Pedersen <[email protected]>
  • Loading branch information
bep authored Aug 5, 2024
1 parent a186448 commit 2b12e18
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions experimental/importresolver_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,20 @@ func Example_importResolver() {

wasi_snapshot_preview1.MustInstantiate(ctx, r)

idm, err := r.CompileModule(ctx, inoutdispatcherWasm)
if err != nil {
log.Panicln(err)
}
idcm, err := r.CompileModule(ctx, inoutdispatcherclientWasm)
if err != nil {
log.Panicln(err)
}

const numInstances = 3
mods := make([]*mod, numInstances)
for i := range mods {
mods[i] = &mod{}
m := mods[i]
idm, err := r.CompileModule(ctx, inoutdispatcherWasm)
if err != nil {
log.Panicln(err)
}
idcm, err := r.CompileModule(ctx, inoutdispatcherclientWasm)
if err != nil {
log.Panicln(err)
}

const inoutDispatcherModuleName = "inoutdispatcher"

Expand Down

0 comments on commit 2b12e18

Please sign in to comment.