feat: faster parser (#3)

* fix(load): support nested objects

* feat: initial golang parser

Moves most of load.libsonnet to a Golang app for hopefully much faster
parsing (fingers crossed)

* feat(fast): nested objects, subpackages

* feat: incorporate fast mode into main binary

Moves the work done in the fast directory into the main executable,
removing the Jsonnet based parser in favor of the much faster Golang one.
This commit is contained in:
sh0rez 2020-05-10 23:09:12 +02:00 committed by GitHub
parent 75f8e7373c
commit 4e4d4a7170
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 442 additions and 57 deletions

View file

@ -15,6 +15,7 @@ func Render(pkg docsonnet.Package) map[string]string {
}
func render(pkg docsonnet.Package, parents []string, root bool) map[string]string {
fmt.Println("render", pkg.Name)
link := "/" + strings.Join(append(parents, pkg.Name), "/")
if root {
link = "/"