hosts

package
v0.0.0-...-2f215ea Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const END_DELIMITER = "### Detours End ###"
View Source
const START_DELIMITER = "### Detours Start ###"

Variables

This section is empty.

Functions

func UpsertHostBock

func UpsertHostBock(mapping HostMapping, sink *os.File) error

TODO: Switch to a generic interface over os.File TODO: Mac vs Windows line endings

Types

type HostMapping

type HostMapping map[Hostname]IPAddress

func ExtractHostBlock

func ExtractHostBlock(src io.Reader) (HostMapping, error)

func (HostMapping) Add

func (m HostMapping) Add(ip IPAddress, host Hostname)

func (HostMapping) AddMany

func (m HostMapping) AddMany(ip IPAddress, hosts string)

func (HostMapping) Remove

func (m HostMapping) Remove(host Hostname)

func (HostMapping) Write

func (m HostMapping) Write(dst io.Writer) error

type Hostname

type Hostname string

type IPAddress

type IPAddress string

Jump to

Keyboard shortcuts

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