formula

package
v0.0.0-...-106d207 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUN = iota
	BUILD
	RECOMMENDED
	OPTIONAL
	INSTALLED
	OUTDATED
	MISSING
)

Various formula-related enumerations

Variables

View Source
var StatusMap = map[int]string{
	INSTALLED: " ✓",
	OUTDATED:  " ✗",
}

Functions

This section is empty.

Types

type Formula

type Formula struct {
	Name              string   `json:"name"`
	FullName          string   `json:"full_name"`
	Oldname           string   `json:"oldname"`
	Aliases           []string `json:"aliases"`
	VersionedFormulae []string `json:"versioned_formulae"`
	Desc              string   `json:"desc"`
	Homepage          string   `json:"homepage"`
	Versions          struct {
		Stable string `json:"stable"`
		Bottle bool   `json:"bottle"`
	} `json:"versions"`
	Revision      int `json:"revision"`
	VersionScheme int `json:"version_scheme"`
	Bottle        struct {
		Stable struct {
			Rebuild int    `json:"rebuild"`
			Cellar  string `json:"cellar"`
			Prefix  string `json:"prefix"`
			RootURL string `json:"root_url"`
			URL     string `json:"-"`
			Sha256  string `json:"-"`
			Files   struct {
				Catalina struct {
					URL    string `json:"url"`
					Sha256 string `json:"sha256"`
				} `json:"catalina,omitempty"`
				Mojave struct {
					URL    string `json:"url"`
					Sha256 string `json:"sha256"`
				} `json:"mojave,omitempty"`
				HighSierra struct {
					URL    string `json:"url"`
					Sha256 string `json:"sha256"`
				} `json:"high_sierra,omitempty"`
				Sierra struct {
					URL    string `json:"url"`
					Sha256 string `json:"sha256"`
				} `json:"sierra,omitempty"`
				ElCapitan struct {
					URL    string `json:"url"`
					Sha256 string `json:"sha256"`
				} `json:"el_capitan,omitempty"`
				Yosemite struct {
					URL    string `json:"url"`
					Sha256 string `json:"sha256"`
				} `json:"yosemite,omitempty"`
				Mavericks struct {
					URL    string `json:"url"`
					Sha256 string `json:"sha256"`
				} `json:"mavericks,omitempty"`
				Linux64 struct {
					URL    string `json:"url"`
					Sha256 string `json:"sha256"`
				} `json:"x86_64_linux,omitempty"`
			} `json:"files"`
		} `json:"stable"`
	} `json:"bottle,omitempty"`
	KegOnly                 bool     `json:"keg_only"`
	BottleDisabled          bool     `json:"bottle_disabled"`
	Options                 []string `json:"options"`
	BuildDependencies       []string `json:"build_dependencies"`
	Dependencies            []string `json:"dependencies"`
	RecommendedDependencies []string `json:"recommended_dependencies"`
	OptionalDependencies    []string `json:"optional_dependencies"`
	UsesFromMacos           []string `json:"uses_from_macos"`
	Requirements            []string `json:"requirements"`
	ConflictsWith           []string `json:"conflicts_with"`
	Caveats                 string   `json:"caveats"`
	Status                  int      `json:"-"`
	InstallDir              string   `json:"-"`
	InstallTime             string   `json:"-"`
	Pinned                  bool     `json:"-"`
	Leaf                    bool     `json:"-"`
	Users                   []string `json:"-"`
}

func (Formula) AddUser

func (f Formula) AddUser(u string) Formula

func (Formula) GetCaveatReport

func (f Formula) GetCaveatReport() (results map[string]string)

func (Formula) GetCellar

func (formula Formula) GetCellar() string

func (Formula) GetDepReport

func (f Formula) GetDepReport(allf Formulas) (results map[string]string)

func (Formula) GetVersion

func (formula Formula) GetVersion() string

func (Formula) Installable

func (formula Formula) Installable() bool

func (Formula) Installed

func (formula Formula) Installed() bool

func (Formula) Out

func (formula Formula) Out() (out string)

func (Formula) Pin

func (formula Formula) Pin() (e error)

func (Formula) Unpin

func (formula Formula) Unpin() (e error)

type Formulas

type Formulas map[string]Formula

func (Formulas) Filter

func (allf Formulas) Filter(fn func(item Formula) bool) Formulas

func (Formulas) FindDeps

func (allf Formulas) FindDeps(names []string, common bool) (result []string)

func (Formulas) FindUsers

func (allf Formulas) FindUsers(names []string, recursive bool) (result []string)

func (Formulas) GetDepStr

func (allf Formulas) GetDepStr(depList []string) (result string)

Formula reports (mostly for "info" cmd)

func (*Formulas) Load

func (allf *Formulas) Load(json_path string) error

func (Formulas) Ls

func (allf Formulas) Ls()

func (Formulas) MkStrList

func (allf Formulas) MkStrList() (list console.FancyStrSlice)

func (Formulas) Subset

func (allf Formulas) Subset(l []string) Formulas

Jump to

Keyboard shortcuts

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