commandsmd

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package commandsmd is built to read the markdown format described in temporalcli/commands.md and generate code from it.

Index

Constants

This section is empty.

Variables

View Source
var CommandsMarkdown []byte

Functions

func GenerateCommandsCode

func GenerateCommandsCode(pkg string, commands []*Command) ([]byte, error)

Types

type Command

type Command struct {
	FullName         string
	NamePath         []string
	UseSuffix        string
	Short            string
	LongPlain        string
	LongHighlighted  string
	LongMarkdown     string
	OptionsSets      []CommandOptions
	HasInit          bool
	ExactArgs        int
	MaximumArgs      int
	IgnoreMissingEnv bool
}

func ParseMarkdownCommands

func ParseMarkdownCommands() ([]*Command, error)

type CommandOption

type CommandOption struct {
	Name         string
	Shorthand    string
	DataType     string
	Desc         string
	Required     bool
	DefaultValue string
	EnumValues   []string
	EnvVar       string
	Aliases      []string
}

type CommandOptions

type CommandOptions struct {
	SetName            string
	Options            []CommandOption
	IncludeOptionsSets []string
}

Jump to

Keyboard shortcuts

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