Documentation ¶
Index ¶
- Constants
- Variables
- type FuncArg
- type Ghosts
- func (that *Ghosts) BackupFilePath() string
- func (that *Ghosts) Gernerate(toclear bool) (newContent string)
- func (that *Ghosts) GetHosts(url string)
- func (that *Ghosts) HostsFilePath() string
- func (that *Ghosts) Parse(resp []byte)
- func (that *Ghosts) PingHosts(ip, url string)
- func (that *Ghosts) ReadAndBackup() (content []byte)
- func (that *Ghosts) Run(toclear ...bool)
Constants ¶
View Source
const ( HEAD = "# FromGhosts Start" TAIL = "# FromGhosts End" TIME = "# UpdateTime: %s" LinePattern = "%s\t\t\t%s # %s" )
Variables ¶
View Source
var ( REG *regexp.Regexp = regexp.MustCompile(`# GitHub520 Host Start[\s\S]*# GitHub520 Host End`) FLAG string = "# GitHub520 Host Start" )
Functions ¶
This section is empty.
Types ¶
type Ghosts ¶
type Ghosts struct {
// contains filtered or unexported fields
}
func (*Ghosts) BackupFilePath ¶
func (*Ghosts) HostsFilePath ¶
func (*Ghosts) ReadAndBackup ¶
Click to show internal directories.
Click to hide internal directories.