Back to / lucicfg / docgen

package docgen

v0.0.0 (7a75572)
Latest Go to latest
Published: 3 hours ago | License: Apache-2.0 | Module:


Package docgen generates documentation from Starlark code.


Package Files

type Generator

type Generator struct {
	// Starlark produces Starlark module's source code.
	// It is then parsed by the generator to extract documentation from it.
	Starlark func(module string) (src string, err error)
	// contains filtered or unexported fields

Generator renders text templates that have access to parsed structured representation of Starlark modules.

The templates use them to inject documentation extracted from Starlark into appropriate places.

func (*Generator) Render

func (g *Generator) Render(templ string) ([]byte, error)

Render renders the given text template in an environment with access to parsed structured Starlark comments.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier