cli

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 40 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
	Retries          int
	ChunkConcurrency int
	Target           string
}

type App

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

func (*App) NoProxy added in v1.7.6

func (a *App) NoProxy() bool

func (*App) RunWithArgs

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

func (*App) Verbose

func (a *App) Verbose() bool

type CacheCleanOptions added in v1.7.3

type CacheCleanOptions struct {
	Older      string
	All        bool
	DryRun     bool
	Yes        bool
	JSON       bool
	Pkg        bool
	API        bool
	SDK        bool
	SDKIndex   bool
	Partial    bool
	KeepLatest bool
}

type CacheListOptions added in v1.7.5

type CacheListOptions struct {
	Root string
	JSON bool
}

type CacheServeOptions added in v1.7.3

type CacheServeOptions struct {
	Host    string
	Port    int
	Root    string
	NoIndex bool
	Token   string
	JSONLog bool
}

type CacheStatusOptions added in v1.7.5

type CacheStatusOptions struct {
	JSON bool
}

type CommandHandler

type CommandHandler func(name string, options any) error

type ConfigOptions

type ConfigOptions struct {
	Action     string
	Key        string
	Value      string
	Target     string
	File       string
	Check      bool
	WithGlobal bool
	Force      bool
}

type DownloadOptions

type DownloadOptions struct {
	Tag              string
	System           string
	To               string
	File             string
	Asset            string
	Rename           string
	StripComponents  int
	Source           bool
	Prerelease       bool
	All              bool
	Quiet            bool
	Ghproxy          bool
	FallbackVersions int
	Retries          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
	InstallMode      string
	StripComponents  int
	Source           bool
	Prerelease       bool
	TrackTag         bool
	All              bool
	InstallAll       bool
	GUI              bool
	Quiet            bool
	Add              bool
	FallbackVersions int
	Retries          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 SDKDownloadOptions added in v1.7.5

type SDKDownloadOptions struct {
	Targets []string
	OS      string
	Arch    string
	Output  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 SDKPathOptions added in v1.7.4

type SDKPathOptions struct {
	Target string
}

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
	Targets []string
	Yes     bool
	Purge   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
	Retries          int
	ChunkConcurrency int
	BatchConcurrency int
	Targets          []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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