compile

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(cmd interface{}) ([]OptionalParam, []RequiredParam)

func FindOptionalParam

func FindOptionalParam(params []OptionalParam, key string) int

func UsesEnvironmentVariables

func UsesEnvironmentVariables(params []OptionalParam) bool

Types

type OptionalParam

type OptionalParam struct {
	Name  string        `json:"name"`
	Value reflect.Value `json:"-"`

	Short       string `json:"short"`
	Long        string `json:"long"`
	Env         string `json:"env,omitempty"`
	IsBool      bool   `json:"isbool,omitempty"`
	Description string `json:"description"`
}

type RequiredParam

type RequiredParam struct {
	Name  string        `json:"name"`
	Value reflect.Value `json:"-"`

	IsSlice     bool   `json:"isslice,omitempty"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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