config

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AutoUpdate   *time.Duration
	Color        core.Color
	DNSServer    *url.URL
	Format       core.Format
	Headers      []core.KeyVal
	HTTP         core.HTTPVersion
	IgnoreStatus *bool
	Insecure     *bool
	NoEncode     *bool
	NoPager      *bool
	Proxy        *url.URL
	QueryParams  []core.KeyVal
	Redirects    *int
	Silent       *bool
	Timeout      *time.Duration
	TLS          *uint16
	Verbosity    *int
	// contains filtered or unexported fields
}

Config represents the configuration options for fetch.

func (*Config) Merge

func (c *Config) Merge(c2 *Config)

Merge merges the two Configs together, with "c" taking priority.

func (*Config) ParseAutoUpdate added in v0.7.3

func (c *Config) ParseAutoUpdate(value string) error

func (*Config) ParseColor

func (c *Config) ParseColor(value string) error

func (*Config) ParseDNSServer

func (c *Config) ParseDNSServer(value string) error

func (*Config) ParseFormat

func (c *Config) ParseFormat(value string) error

func (*Config) ParseHTTP

func (c *Config) ParseHTTP(value string) error

func (*Config) ParseHeader

func (c *Config) ParseHeader(value string) error

func (*Config) ParseIgnoreStatus

func (c *Config) ParseIgnoreStatus(value string) error

func (*Config) ParseInsecure

func (c *Config) ParseInsecure(value string) error

func (*Config) ParseNoEncode

func (c *Config) ParseNoEncode(value string) error

func (*Config) ParseNoPager

func (c *Config) ParseNoPager(value string) error

func (*Config) ParseProxy

func (c *Config) ParseProxy(value string) error

func (*Config) ParseQuery

func (c *Config) ParseQuery(value string) error

func (*Config) ParseRedirects

func (c *Config) ParseRedirects(value string) error

func (*Config) ParseSilent

func (c *Config) ParseSilent(value string) error

func (*Config) ParseTLS

func (c *Config) ParseTLS(value string) error

func (*Config) ParseTimeout

func (c *Config) ParseTimeout(value string) error

func (*Config) ParseVerbosity

func (c *Config) ParseVerbosity(value string) error

func (*Config) Set

func (c *Config) Set(key, val string) error

Set sets the provided key and value pair, returning any error encountered.

type File

type File struct {
	Global *Config
	Hosts  map[string]*Config
}

File represents a configuration file.

func GetFile

func GetFile(path string) (*File, error)

GetFile returns a config File, or nil if one cannot be found.

Jump to

Keyboard shortcuts

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