mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: show map type correctly
This commit is contained in:
parent
b9955aee84
commit
9e14850bbf
@ -433,7 +433,14 @@ pub fn (table &Table) type_to_str(t Type) string {
|
|||||||
res += ')'
|
res += ')'
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
mut res := sym.name.replace('array_', '[]')
|
|
||||||
|
mut res := sym.name
|
||||||
|
if sym.kind == .array {
|
||||||
|
res = res.replace('array_', '[]')
|
||||||
|
}
|
||||||
|
else if sym.kind == .map {
|
||||||
|
res = res.replace('map_string_', 'map[string]')
|
||||||
|
}
|
||||||
// mod.submod.submod2.Type => submod2.Type
|
// mod.submod.submod2.Type => submod2.Type
|
||||||
if res.contains('.') {
|
if res.contains('.') {
|
||||||
vals := res.split('.')
|
vals := res.split('.')
|
||||||
|
Loading…
Reference in New Issue
Block a user