Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Provider = updates.ProviderFunc(func() (updates.Info, error) { out, err := exec.Command("checkupdates").Output() if err != nil { if exitErr, ok := err.(*exec.ExitError); ok { if exitErr.ProcessState.ExitCode() == 2 { err = nil } } return updates.Info{}, err } details, err := ParsePackageDetails(out) if err != nil { return updates.Info{}, err } info := updates.Info{ Updates: len(details), PackageDetails: details, } return info, nil })
Provider is an updates.Provider which checks for pacman updates.
Functions ¶
func ParsePackageDetails ¶
func ParsePackageDetails(raw []byte) (updates.PackageDetails, error)
ParsePackageDetails parses package details from pacman compatible output of the form "packageName currentVersion -> targetVersion" and returns the package details. Returns an error if raw contains malformed lines.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.