hostedit

package
v0.11.1-0...-8ab92b3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotNitroEntries = fmt.Errorf("there are no nitro entries to remove from the hosts file")

Functions

func IsUpdated

func IsUpdated(file, addr string, hosts ...string) (updated bool, err error)

IsUpdated is used to check if an update will make any changes to the hosts file and return true if there is nothing to change

func Remove

func Remove(file string) (content string, err error)

Remove is responsible for removing all of the hosts entries for the nitro config from the hosts file.

func Update

func Update(file, addr string, hosts ...string) (content string, err error)

Update takes a file, reads the content and updates or appends the addr and hosts for the sites.

Types

This section is empty.

Jump to

Keyboard shortcuts

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