hosts

package
v1.3.15 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	IP     string
	Names  []string
	IsIPv4 bool
}

func (*Host) Parse

func (h *Host) Parse(text string) error

type Hosts

type Hosts struct {
	FilePath string
	Mapping  map[string]string
}

func New

func New(filepath string) *Hosts

func (*Hosts) Length

func (h *Hosts) Length() int

func (*Hosts) Load

func (h *Hosts) Load() error

func (*Hosts) LookUp

func (h *Hosts) LookUp(host string, typ ...int) (string, error)

Jump to

Keyboard shortcuts

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