We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47145ea commit ed82bbdCopy full SHA for ed82bbd
1 file changed
doc/docs.md
@@ -4190,6 +4190,18 @@ user := repo.find_user_by_id(7) or {
4190
}
4191
```
4192
4193
+Use `err is ...` to compare errors:
4194
+```v oksyntax
4195
+import io
4196
+
4197
+x := read() or {
4198
+ if err is io.Eof {
4199
+ println('end of file')
4200
+ }
4201
+ return
4202
+}
4203
+```
4204
4205
#### Options/results when returning multiple values
4206
4207
Only one `Option` or `Result` is allowed to be returned from a function. It is
0 commit comments