Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPaths ¶ added in v3.17.0
ConfigPaths returns the candidate config files inspected for an ecosystem. (Go is detected separately via netrc + the GOPROXY environment.)
func ProxyURLWithSlash ¶
func RequireWriter ¶
Types ¶
type ConfigFile ¶
type ConfigFile struct {
Path string
Content string
Structured bool
// Merge, when set, computes the new file content from the file's existing
// content (read by the writer) instead of replacing it. Used to fold the
// firewall settings into a user's real config non-destructively (paru.conf,
// yay config.json). The writer backs up the original before writing.
Merge func(existing string) (string, error)
}
func ConfigFiles ¶
func ConfigFiles(eco Ecosystem, opts ConfigOptions) ([]ConfigFile, error)
type ConfigOptions ¶
type Detected ¶ added in v3.17.0
type Detected struct {
Ecosystem Ecosystem
Configured bool
Path string // the config file that matched, when Configured
}
Detected reports whether a package manager's config points at the firewall.
Click to show internal directories.
Click to hide internal directories.