Documentation ¶
Index ¶
- Variables
- func Insert(entries Mapping) error
- func IsLocal(host string) bool
- func IsPrivate(host string) bool
- func Match(root, needle string) (sub string, ok bool)
- func MatchMap[V any](m map[string]V, needle string) (root, sub string, val V)
- func Range(v string, f func(root, sub string) bool) bool
- func TestMap[V any](m map[string]V, needle string) (ok bool)
- func UpdateSystemConfig(cb func(*Config) (err error)) error
- type Address
- type Config
- type EntryLine
- type Hostname
- type Mapping
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAbort = errors.New("abort") // used to abort an update
Functions ¶
func Match ¶
google.com, www.google.com -> www., true google.com, google.com -> "", true google.com, yahoo.com -> "", false
func UpdateSystemConfig ¶
Types ¶
type Config ¶
type Config []EntryLine
func SystemConfig ¶
func (Config) MarshalText ¶
func (*Config) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.