1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/json/json_decode_with_option_arg_test.v
2023-01-09 09:36:45 +03:00

20 lines
297 B
V

import json
import os
struct DbConfig {}
fn test_json_decode_with_option_arg() {
if ret := print_info() {
println(ret)
} else {
println(err)
}
assert true
}
fn print_info() !string {
dbconf := json.decode(DbConfig, os.read_file('dbconf.json')!)!
println(dbconf)
return '${dbconf}'
}