Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostsEdit ¶
HostsEdit represents the entire hosts file and provides methods to manipulate it.
func New ¶
New loads the hosts file from the specified path and returns a HostsEdit instance. isParse 是否进行严格的语法分析,如果启用则不容忍注释行以外的重复的主机、不规范的主机的条目,遇到此类会报错。但操作系统在这种情况下往往不会报错,与操作系统的行为不符。
func (*HostsEdit) Delete ¶
Delete removes the specified host from the hosts file. not exists no error
Click to show internal directories.
Click to hide internal directories.