added tree, index, onepage and singlepages
This commit is contained in:
parent
2889455633
commit
b96fcf473e
1 changed files with 8 additions and 1 deletions
|
@ -41,6 +41,8 @@ type index struct {
|
||||||
group string
|
group string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var arg = ""
|
||||||
|
|
||||||
func getSpec(level int, specName string) spec {
|
func getSpec(level int, specName string) spec {
|
||||||
spec := spec{}
|
spec := spec{}
|
||||||
|
|
||||||
|
@ -225,6 +227,7 @@ func main() {
|
||||||
log.Fatal("error: ", err)
|
log.Fatal("error: ", err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
arg = os.Args[1]
|
||||||
spec := getSpec(1, os.Args[1])
|
spec := getSpec(1, os.Args[1])
|
||||||
specs[spec.uuid] = spec
|
specs[spec.uuid] = spec
|
||||||
}
|
}
|
||||||
|
@ -350,7 +353,11 @@ func printFields(level int, fields []field, baseUuidLength int, baseName string,
|
||||||
if len(fields[i].uuid) > baseUuidLength && len(fields[i].uuid[baseUuidLength+1:]) > 0 {
|
if len(fields[i].uuid) > baseUuidLength && len(fields[i].uuid[baseUuidLength+1:]) > 0 {
|
||||||
fmt.Println(fill + " " + baseName + "." + fields[i].uuid[baseUuidLength+1:])
|
fmt.Println(fill + " " + baseName + "." + fields[i].uuid[baseUuidLength+1:])
|
||||||
} else if len(fields[i].uuid) == baseUuidLength {
|
} else if len(fields[i].uuid) == baseUuidLength {
|
||||||
|
if recurse {
|
||||||
fmt.Println(fill + " " + baseName)
|
fmt.Println(fill + " " + baseName)
|
||||||
|
} else {
|
||||||
|
fmt.Println(fill + " " + baseName + fields[i].uuid[len(arg):])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for j := range fields[i].description {
|
for j := range fields[i].description {
|
||||||
fmt.Println(fill + " " + fields[i].description[j])
|
fmt.Println(fill + " " + fields[i].description[j])
|
||||||
|
|
Loading…
Reference in a new issue