cli

package
v0.0.0-...-908e76c Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(packages ...*v1.Package) (*v1.Package, error)

Merge merges the given packages into a single package.

Types

type Printer

type Printer struct {
	// contains filtered or unexported fields
}

func (*Printer) PrintCommand

func (p *Printer) PrintCommand(out io.Writer, cmd *v1.Command) error

func (*Printer) PrintRoot

func (p *Printer) PrintRoot(out io.Writer, pkg *v1.Package, currentPackage string) error

type Walk

type Walk struct {
	// contains filtered or unexported fields
}

Walk is a command line interface generator. It generates a command line interface from protogen result.

func NewWalk

func NewWalk(file string, rootDirectory string, rootPackage string) (*Walk, error)

NewWalk creates a new Walk.

file is a protogen result file. It contains protojson encoded v1.Package.

rootDirectory is a root directory where the generated files are placed. e.g. internal/cli/generated

rootPackage is a root package name of the generated root file. e.g. github.com/nokamoto/2pf23/internal/cli/generated

func (*Walk) Walk

func (w *Walk) Walk() error

Directories

Path Synopsis
Code generated by cli-gen.
Code generated by cli-gen.
ke
Code generated by cli-gen.
Code generated by cli-gen.
ke/v1alpha
Code generated by cli-gen.
Code generated by cli-gen.
ke/v1alpha/cluster
Code generated by cli-gen.
Code generated by cli-gen.

Jump to

Keyboard shortcuts

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