Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes filesystem test simpler and removes use of panic in examples #395

Merged
merged 1 commit into from
Mar 19, 2022

Conversation

codefromthecrypt
Copy link
Contributor

This reduces size of #394 so that when finished, it is easier to review.

@@ -12,11 +12,11 @@ func main() {
for s.Scan() {
line := s.Text()
if _, err := fmt.Printf("Hello, %s!\n", strings.TrimSpace(line)); err != nil {
panic(err)
os.Exit(1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC when we wrote these examples, we didn't implement exit, yet

@codefromthecrypt
Copy link
Contributor Author

I will raise a PR to document the WASIConfig because I think it is easy to forget arg[0] is the program name. In this case, I think it probably makes sense to default it to the WASM module name, but we can discuss on that PR.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt codefromthecrypt merged commit 5b35bd9 into main Mar 19, 2022
@codefromthecrypt codefromthecrypt deleted the simpler-examples branch March 19, 2022 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants