diff options
-rw-r--r-- | README.md | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |