Documentation ¶
Index ¶
- Constants
- Variables
- type Arguments
- func (a *Arguments) AddArg(options ...string) error
- func (a *Arguments) AddTarget(targets ...string)
- func (a *Arguments) ClearTargets()
- func (a *Arguments) Copy() (cp *Arguments)
- func (a *Arguments) CopyGlobal() *Arguments
- func (a *Arguments) CreateOrAppendOption(option string, values ...string)
- func (a *Arguments) DelArg(options ...string)
- func (a *Arguments) ExistsArg(options ...string) bool
- func (a *Arguments) ExistsDouble(options ...string) bool
- func (a *Arguments) FormatArgs() (args []string)
- func (a *Arguments) FormatGlobals() (args []string)
- func (a *Arguments) GetArg(options ...string) (arg string, double, exists bool)
- func (a *Arguments) GetArgs(option string) (args []string)
- func (a *Arguments) NeedRoot(runtime *Runtime) bool
- func (a *Arguments) ParseCommandLine(config *Configuration) error
- func (a *Arguments) String() string
- type Configuration
- type Option
- type Runtime
- type TargetMode
Constants ¶
View Source
const ( // Describes Sorting method for numberdisplay BottomUp = iota TopDown )
Variables ¶
View Source
var HideMenus = false
HideMenus indicates if pacman's provider menus must be hidden
View Source
var NoConfirm = false
NoConfirm indicates if user input should be skipped
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
Arguments Parses command line arguments in a way we can interact with programmatically but also in a way that can easily be passed to pacman later on.
func MakeArguments ¶
func MakeArguments() *Arguments
func (*Arguments) ClearTargets ¶
func (a *Arguments) ClearTargets()
func (*Arguments) CopyGlobal ¶
func (*Arguments) CreateOrAppendOption ¶ added in v10.0.4
func (*Arguments) ExistsDouble ¶
Multiple args acts as an OR operator
func (*Arguments) FormatArgs ¶
func (*Arguments) FormatGlobals ¶
func (*Arguments) ParseCommandLine ¶
func (a *Arguments) ParseCommandLine(config *Configuration) error
type Configuration ¶
type Configuration struct { AURURL string `json:"aururl"` BuildDir string `json:"buildDir"` ABSDir string `json:"absdir"` Editor string `json:"editor"` EditorFlags string `json:"editorflags"` MakepkgBin string `json:"makepkgbin"` MakepkgConf string `json:"makepkgconf"` PacmanBin string `json:"pacmanbin"` PacmanConf string `json:"pacmanconf"` ReDownload string `json:"redownload"` ReBuild string `json:"rebuild"` AnswerClean string `json:"answerclean"` AnswerDiff string `json:"answerdiff"` AnswerEdit string `json:"answeredit"` AnswerUpgrade string `json:"answerupgrade"` GitBin string `json:"gitbin"` GpgBin string `json:"gpgbin"` GpgFlags string `json:"gpgflags"` MFlags string `json:"mflags"` SortBy string `json:"sortby"` SearchBy string `json:"searchby"` GitFlags string `json:"gitflags"` RemoveMake string `json:"removemake"` SudoBin string `json:"sudobin"` SudoFlags string `json:"sudoflags"` RequestSplitN int `json:"requestsplitn"` SearchMode int `json:"-"` SortMode int `json:"sortmode"` CompletionInterval int `json:"completionrefreshtime"` SudoLoop bool `json:"sudoloop"` TimeUpdate bool `json:"timeupdate"` Devel bool `json:"devel"` CleanAfter bool `json:"cleanAfter"` Provides bool `json:"provides"` PGPFetch bool `json:"pgpfetch"` UpgradeMenu bool `json:"upgrademenu"` CleanMenu bool `json:"cleanmenu"` DiffMenu bool `json:"diffmenu"` EditMenu bool `json:"editmenu"` CombinedUpgrade bool `json:"combinedupgrade"` UseAsk bool `json:"useask"` BatchInstall bool `json:"batchinstall"` Runtime *Runtime `json:"-"` }
Configuration stores yay's config.
func DefaultConfig ¶ added in v10.1.0
func DefaultConfig() *Configuration
func NewConfig ¶ added in v10.1.0
func NewConfig(version string) (*Configuration, error)
func (*Configuration) Save ¶ added in v10.1.0
func (c *Configuration) Save(configPath string) error
SaveConfig writes yay config to file.
func (*Configuration) String ¶
func (c *Configuration) String() string
Click to show internal directories.
Click to hide internal directories.