diff options
author | Louis Pilfold <louis@lpil.uk> | 2022-01-01 16:28:46 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2022-01-01 16:28:46 +0000 |
commit | 09eee2ac5f14d0868233ad2251d6aedb5c187b59 (patch) | |
tree | 9c7f3288936ece06a39e430481ece51655f7f87c /README.md | |
parent | 1889ac98f4979888568790e7bb0e9714da4e7439 (diff) | |
download | gleam_json-09eee2ac5f14d0868233ad2251d6aedb5c187b59.tar.gz gleam_json-09eee2ac5f14d0868233ad2251d6aedb5c187b59.zip |
Hack around GH syntax highlighting
Diffstat (limited to 'README.md')
-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 |