From 859da536ea21be1a8c61e904e01e5de57e592529 Mon Sep 17 00:00:00 2001 From: Everett Pompeii Date: Tue, 19 Mar 2024 12:47:24 -0400 Subject: [PATCH] Fix typo Change `alsos` to `also`. --- src/docs/goose-book/src/getting-started/creating.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/goose-book/src/getting-started/creating.md b/src/docs/goose-book/src/getting-started/creating.md index 3262a8fa..2ae14a2b 100644 --- a/src/docs/goose-book/src/getting-started/creating.md +++ b/src/docs/goose-book/src/getting-started/creating.md @@ -90,6 +90,6 @@ async fn main() -> Result<(), GooseError> { The `#[tokio::main]` at the beginning of this example is a Tokio macro necessary because Goose is an asynchronous library, allowing (and requiring) us to declare the `main()` function of our load test application as `async`. -If you're new to Rust, `main()`'s return type of `Result<(), GooseError>` may look strange. It essentially says that `main` will return nothing (`()`) on success, and will return a `GooseError` on failure. This is helpful as several of `GooseAttack`'s methods can fail, returning an error. In our example, `initialize()` and `execute()` each may fail. The `?` that follows the method's name tells our program to exit and return an error on failure, otherwise continue on. Note that the `.execute()` method is asynchronous, so it must be followed with `.await`, and as it can return an error it alsos has a `?`. The final line, `Ok(())` returns the empty result expected on success. +If you're new to Rust, `main()`'s return type of `Result<(), GooseError>` may look strange. It essentially says that `main` will return nothing (`()`) on success, and will return a `GooseError` on failure. This is helpful as several of `GooseAttack`'s methods can fail, returning an error. In our example, `initialize()` and `execute()` each may fail. The `?` that follows the method's name tells our program to exit and return an error on failure, otherwise continue on. Note that the `.execute()` method is asynchronous, so it must be followed with `.await`, and as it can return an error it also has a `?`. The final line, `Ok(())` returns the empty result expected on success. And that's it, you've created your first load test! Read on to see how to run it and what it does.