hosts

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package hosts manages alterations to the /etc/hosts file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceTagged

func ReplaceTagged(tag string, entries []Entry) error

ReplaceTagged removes all lines in /etc/hosts marked with the specified tag and insert the given slice of entries instead. The slice may be nil or zero length to remove all tagged entries.

Types

type Entry

type Entry struct {
	IP    string
	Names []string
	Tag   string
}

An Entry represents a line in /etc/hosts

Jump to

Keyboard shortcuts

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