aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index eb36512..f557e3c 100644
--- a/README.md
+++ b/README.md
@@ -31,11 +31,6 @@ import gleam/json
import gleam/dynamic
import gleam/result
-pub type MyError {
- InvalidJson(json.DecodeError)
- InvalidFormat(dynamic.DecodeError)
-}
-
pub fn cat_from_json(json: String) -> Result<Cat, MyError> {
try data =
json.decode(encoded)
@@ -51,6 +46,11 @@ pub fn cat_from_json(json: String) -> Result<Cat, MyError> {
Ok(cat)
}
+
+pub type MyError {
+ InvalidJson(json.DecodeError)
+ InvalidFormat(dynamic.DecodeError)
+}
```
## Installation