Avoids returning ExitError on exit code zero, and optimizes for no allocations (#1284)

Fixes #1283

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2023-03-24 16:42:30 +01:00
committed by GitHub
parent 86f3b190eb
commit 451c792ee8
22 changed files with 162 additions and 108 deletions

View File

@@ -45,7 +45,7 @@ func ExampleRuntimeConfig_WithCloseOnContextDone_context_timeout() {
fmt.Println(err)
// Output:
// module "malicious_wasm" closed with context deadline exceeded
// module closed with context deadline exceeded
}
// ExampleRuntimeConfig_WithCloseOnContextDone_context_cancel demonstrates how to ensure the termination
@@ -82,7 +82,7 @@ func ExampleRuntimeConfig_WithCloseOnContextDone_context_cancel() {
fmt.Println(err)
// Output:
// module "malicious_wasm" closed with context canceled
// module closed with context canceled
}
// ExampleRuntimeConfig_WithCloseOnContextDone_moduleClose demonstrates how to ensure the termination
@@ -120,5 +120,5 @@ func ExampleRuntimeConfig_WithCloseOnContextDone_moduleClose() {
fmt.Println(err)
// Output:
// module "malicious_wasm" closed with exit_code(1)
// module closed with exit_code(1)
}