From 59de070954e72d278952ae87fbe7f29c65f949a3 Mon Sep 17 00:00:00 2001 From: Chris O'Hara Date: Sat, 18 Nov 2023 10:59:36 +1000 Subject: [PATCH] Update example in README --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c1f910f..f4aa291 100644 --- a/README.md +++ b/README.md @@ -255,10 +255,8 @@ func main() { if !errors.Is(err, fs.ErrNotExist) { log.Fatal(err) } - } else { - if _, err := coro.Context().Unmarshal(b); err != nil { - log.Fatal(err) - } + } else if err := coro.Context().Unmarshal(b); err != nil { + log.Fatal(err) } defer func() { @@ -308,7 +306,7 @@ More examples of how to use durable coroutines can be found in [examples](./exam #### Extend serialization -`coroutine` is able to seamlessly serialized and deserialize most types by +`coroutine` is able to seamlessly serialize and deserialize most types by default. However there are times when you may want to control the serialization of specific types. For example, `chan` values are not supported, or you may decide that some values need specific logic to be functional upon