Documentation ¶
Overview ¶
Package spec contains commonly used function for handling spec files
Index ¶
Constants ¶
View Source
const ( // The spec file is always located in the template root dir and named spec.yaml. SpecFileName = "spec.yaml" // Keys for output formatting. OutputDescriptionKey = "Description" OutputInputNameKey = "Input name" OutputInputDefaultValueKey = "Default" OutputInputRuleKey = "Rule" )
Variables ¶
This section is empty.
Functions ¶
func AllInputAttrs ¶
AllInputAttrs describes all spec.Input values in the spec.
func Attrs ¶
Attrs returns a list of human-readable attributes describing a spec, as a list where each entry is a list of columns.
Example:
{ {"Description", "example description"}, {"Input Name", "example name"}, }
func FormatAttrs ¶
FormatAttrs formats the attribute list for output
Example output:
Description: Test Template
Input name: name1 Description: desc1 Default: . Rule 0: test rule 0 Rule 0 msg: test rule 0 message Rule 1: test rule 1
Input name: name2 Description: desc2.
func OneInputAttrs ¶
OneInputAttrs describes a specific spec.Input value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.