cli

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented = errors.New("not implemented")
)

Functions

func Main

func Main(args []string, stdout, stderr io.Writer) error

func SetBuildInfo

func SetBuildInfo(versionStr, gitHashStr, buildTimeStr string)

SetBuildInfo sets the build information for the application.

Types

type AddOptions

type AddOptions struct {
	Name             string
	Tag              string
	System           string
	To               string
	File             string
	Asset            string
	Rename           string
	StripComponents  int
	Source           bool
	All              bool
	GUI              bool
	Quiet            bool
	ChunkConcurrency int
	Target           string
}

type App

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

func (*App) RunWithArgs

func (a *App) RunWithArgs(args []string) error

func (*App) Verbose

func (a *App) Verbose() bool

type CommandHandler

type CommandHandler func(name string, options any) error

type ConfigOptions

type ConfigOptions struct {
	Action string
	Key    string
	Value  string
}

type DownloadOptions

type DownloadOptions struct {
	Tag              string
	System           string
	To               string
	File             string
	Asset            string
	Rename           string
	StripComponents  int
	Source           bool
	All              bool
	Quiet            bool
	FallbackVersions int
	ChunkConcurrency int
	Target           string
}

type Info added in v1.7.2

type Info struct {
	Version   string
	GitHash   string
	BuildTime string
}

func BuildInfo added in v1.7.2

func BuildInfo() Info

type InstallOptions

type InstallOptions struct {
	Tag              string
	System           string
	To               string
	File             string
	Asset            string
	Rename           string
	Name             string
	StripComponents  int
	Source           bool
	All              bool
	InstallAll       bool
	GUI              bool
	Quiet            bool
	Add              bool
	FallbackVersions int
	ChunkConcurrency int
	BatchConcurrency int
	Targets          []string
}

type ListOptions

type ListOptions struct {
	Outdated    bool
	All         bool
	GUI         bool
	NoInstalled bool
	Info        string
}

type QueryOptions added in v1.5.1

type QueryOptions struct {
	Action     string
	Tag        string
	Limit      int
	JSON       bool
	Prerelease bool
	Target     string
}

type SDKConfigOptions added in v1.7.0

type SDKConfigOptions struct {
	Action string
	Name   string
	All    bool
	Force  bool
	Mirror string
}

type SDKIndexOptions added in v1.7.0

type SDKIndexOptions struct {
	Action string
	Name   string
	All    bool
	JSON   bool
}

type SDKInstallOptions added in v1.7.0

type SDKInstallOptions struct {
	Targets []string
	Force   bool
}

type SDKListOptions added in v1.7.0

type SDKListOptions struct {
	Name string
	JSON bool
}

type SDKRemoveOptions added in v1.7.0

type SDKRemoveOptions struct {
	Target string
}

type SDKSearchOptions added in v1.7.0

type SDKSearchOptions struct {
	Name     string
	Keywords []string
	JSON     bool
	Number   int
	Sort     string
}

type SearchOptions added in v1.5.2

type SearchOptions struct {
	Keyword string
	Extras  []string
	Limit   int
	Sort    string
	Order   string
	JSON    bool
}

type ShowOptions added in v1.7.0

type ShowOptions struct {
	Target string
}

type UninstallOptions

type UninstallOptions struct {
	Target string
	Yes    bool
}

type UpdateOptions

type UpdateOptions struct {
	All              bool
	Check            bool
	DryRun           bool
	Interactive      bool
	Self             bool
	SelfSource       string
	Tag              string
	System           string
	To               string
	File             string
	Asset            string
	Source           bool
	Quiet            bool
	ChunkConcurrency int
	BatchConcurrency int
	Targets          []string
}

Jump to

Keyboard shortcuts

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