docgen

package
v0.0.0-...-055d146 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package docgen contain the main functions to preprocess an AST and to write the documentation to the output file

Index

Constants

View Source
const (
	// OutputTypeJSON represent the JSON output type
	OutputTypeJSON = OutputType("json")

	// OutputTypeMD represent the MarkDown output type
	OutputTypeMD = OutputType("md")
)

Variables

View Source
var ErrorWrongOutputFormat = fmt.Errorf("wrong output format")

ErrorWrongOutputFormat means that the used specified an output format which we don't support

Functions

func Extract

func Extract(kubeTypes parser.KubeTypes, format OutputType, mdConfiguration string, mdTemplate string) (string, error)

Extract extracts the documentation output from the list of types given the output format and the markdown configuration file path

func Output

func Output(fileName string, content string) error

Output writes the documentation to a certain file. If the filename is empty the documentation is written to stdout

Types

type OutputType

type OutputType string

OutputType is an output type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL