Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DocsCmd = &cobra.Command{ Use: "docs [flags] file [file...]", Short: "Work with help documents", Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { ctx := cmd.Context() gp, _, err := cli.CreateGlazedProcessorFromCobra(cmd) cobra.CheckErr(err) for _, arg := range args { s, err := os.ReadFile(arg) cobra.CheckErr(err) var metaData types.Row inputReader := bytes.NewReader(s) _, err = frontmatter.Parse(inputReader, &metaData) cobra.CheckErr(err) metaData.Set("path", arg) err = gp.AddRow(ctx, metaData) cobra.CheckErr(err) } err = gp.Close(ctx) if _, ok := err.(*cmds.ExitWithoutGlazeError); ok { os.Exit(0) } cobra.CheckErr(err) }, }
View Source
var MarkdownCmd = &cobra.Command{
Use: "markdown",
Short: "Convert markdown data",
}
Functions ¶
This section is empty.
Types ¶
type CsvCommand ¶ added in v0.2.25
type CsvCommand struct {
// contains filtered or unexported fields
}
func NewCsvCommand ¶ added in v0.2.25
func NewCsvCommand() (*CsvCommand, error)
func (*CsvCommand) Description ¶ added in v0.2.25
func (c *CsvCommand) Description() *cmds.CommandDescription
func (*CsvCommand) Run ¶ added in v0.2.25
func (c *CsvCommand) Run( ctx context.Context, parsedLayers map[string]*layers.ParsedParameterLayer, ps map[string]interface{}, gp middlewares.Processor, ) error
type ExampleCommand ¶ added in v0.3.8
type ExampleCommand struct {
// contains filtered or unexported fields
}
func NewExampleCommand ¶ added in v0.3.8
func NewExampleCommand() (*ExampleCommand, error)
func (*ExampleCommand) Description ¶ added in v0.3.8
func (c *ExampleCommand) Description() *cmds.CommandDescription
func (*ExampleCommand) Run ¶ added in v0.3.8
func (c *ExampleCommand) Run( ctx context.Context, parsedLayers map[string]*layers.ParsedParameterLayer, ps map[string]interface{}, gp middlewares.Processor, ) error
type ExtensionFlag ¶
type JsonCommand ¶ added in v0.2.10
type JsonCommand struct {
// contains filtered or unexported fields
}
func NewJsonCommand ¶ added in v0.2.10
func NewJsonCommand() (*JsonCommand, error)
func (*JsonCommand) Description ¶ added in v0.2.10
func (j *JsonCommand) Description() *cmds.CommandDescription
func (*JsonCommand) Run ¶ added in v0.2.10
func (j *JsonCommand) Run( ctx context.Context, parsedLayers map[string]*layers.ParsedParameterLayer, ps map[string]interface{}, gp middlewares.Processor, ) error
type YamlCommand ¶ added in v0.2.10
type YamlCommand struct {
// contains filtered or unexported fields
}
func NewYamlCommand ¶ added in v0.2.10
func NewYamlCommand() (*YamlCommand, error)
func (*YamlCommand) Description ¶ added in v0.2.10
func (y *YamlCommand) Description() *cmds.CommandDescription
func (*YamlCommand) Run ¶ added in v0.2.10
func (y *YamlCommand) Run( ctx context.Context, _ map[string]*layers.ParsedParameterLayer, ps map[string]interface{}, gp middlewares.Processor, ) error
Click to show internal directories.
Click to hide internal directories.