1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

example: improve json example

This commit is contained in:
jm-duro 2020-05-11 11:06:51 +02:00 committed by GitHub
parent 8bc0c31f29
commit 8488f7d82b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,10 @@ fn main() {
for i, user in users {
println('$i) $user.name')
if !user.can_register() {
println('Cannot register $user.name, they are too young')
println('Cannot register $user.name, he is too young')
} else {
users[i].register()
println('$user.name is registered')
}
}
// Let's encode users again just for fun