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

doc: print available modules

This commit is contained in:
Alexander Medvednikov
2020-05-15 23:09:38 +02:00
parent 2dbb4c2ca7
commit 7caebc5781
2 changed files with 18 additions and 5 deletions

View File

@@ -92,12 +92,15 @@ fn main_v() {
return
}
'doc' {
mut mod := ''
if args.len == 1 {
println('v doc [module]')
exit(1)
}
else if args.len > 1 {
mod = args[1]
}
table := table.new_table()
println(doc.doc(args[1], table, prefs))
println(doc.doc(mod, table, prefs))
return
}
else {}