Documentation
¶
Index ¶
- func BindStruct(file *File, key string, dst any) error
- func DecodeTo(file *File, dst any) error
- func GetByPath(file *File, key string) (any, bool)
- func IsNotExist(err error) bool
- func OSConfigPath(homeDir, goos string, lookupEnv func(string) (string, bool)) string
- func ResolveConfigPath() (string, error)
- func ResolveWritablePath() (string, error)
- func Save(path string, file *File) error
- func SetByPath(file *File, key string, value any) error
- type APICacheSection
- type CLIOverrides
- type File
- type GhproxySection
- type Merged
- type Section
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotExist ¶
func OSConfigPath ¶
func ResolveConfigPath ¶
func ResolveWritablePath ¶
Types ¶
type APICacheSection ¶ added in v1.5.1
type CLIOverrides ¶
type CLIOverrides struct {
ExtractAll *bool
AssetFilters *[]string
CacheDir *string
ProxyURL *string
DownloadOnly *bool
File *string
GithubToken *string
IsGUI *bool
Name *string
Quiet *bool
ShowHash *bool
Source *bool
SourcePath *string
System *string
Tag *string
Target *string
UpgradeOnly *bool
Verify *string
DisableSSL *bool
}
type File ¶
type File struct {
Meta struct {
Keys []string
}
Global Section `toml:"global" mapstructure:"global"`
ApiCache APICacheSection `toml:"api_cache" mapstructure:"api_cache"`
Ghproxy GhproxySection `toml:"ghproxy" mapstructure:"ghproxy"`
Repos map[string]Section
Packages map[string]Section `toml:"packages" mapstructure:"packages"`
}
func LoadFromEnvOrDefault ¶
type GhproxySection ¶ added in v1.5.1
type Merged ¶
type Merged struct {
ExtractAll bool
AssetFilters []string
CacheDir string
ProxyURL string
DownloadOnly bool
File string
GithubToken string
GuiTarget string
IsGUI bool
Name string
Quiet bool
ShowHash bool
Source bool
SourcePath string
System string
Tag string
Target string
UpgradeOnly bool
Verify string
DisableSSL bool
}
func MergeInstallOptions ¶
func MergeInstallOptions(global, repo, pkg Section, cli CLIOverrides) Merged
type Section ¶
type Section struct {
ExtractAll *bool `toml:"extract_all" mapstructure:"extract_all"`
AssetFilters []string `toml:"asset_filters" mapstructure:"asset_filters"`
CacheDir *string `toml:"cache_dir" mapstructure:"cache_dir"`
ProxyURL *string `toml:"proxy_url" mapstructure:"proxy_url"`
DownloadOnly *bool `toml:"download_only" mapstructure:"download_only"`
File *string `toml:"file" mapstructure:"file"`
GithubToken *string `toml:"github_token" mapstructure:"github_token"`
GuiTarget *string `toml:"gui_target" mapstructure:"gui_target"`
IsGUI *bool `toml:"is_gui" mapstructure:"is_gui"`
Name *string `toml:"name" mapstructure:"name"`
Quiet *bool `toml:"quiet" mapstructure:"quiet"`
Repo *string `toml:"repo" mapstructure:"repo"`
ShowHash *bool `toml:"show_hash" mapstructure:"show_hash"`
Source *bool `toml:"download_source" mapstructure:"download_source"`
SourcePath *string `toml:"source_path" mapstructure:"source_path"`
System *string `toml:"system" mapstructure:"system"`
Tag *string `toml:"tag" mapstructure:"tag"`
Target *string `toml:"target" mapstructure:"target"`
UpgradeOnly *bool `toml:"upgrade_only" mapstructure:"upgrade_only"`
Verify *string `toml:"verify_sha256" mapstructure:"verify_sha256"`
DisableSSL *bool `toml:"disable_ssl" mapstructure:"disable_ssl"`
}
Click to show internal directories.
Click to hide internal directories.