Documentation
¶
Index ¶
- Constants
- Variables
- func GetConfigFilesName() ([]string, map[string]string, error)
- func GetConfigHostDir() string
- func GetFileBody(fileName string) ([]byte, string, error)
- func GetHostFileDir() string
- func GetHostFilePath() string
- func GetHostPath() (fileDir, filePath string)
- func GetHostsFileByte() (res []byte, err error)
- func IsRoot() bool
- func SaveHostFile(fileName string, body []byte) error
- func SetHostsFileByte(body []byte) (err error)
Constants ¶
View Source
const ( ConfigDir = "gaihosts" ConfigExt = ".buguai" )
配置 hosts 的文件信息
Variables ¶
View Source
var ( ErrNoHostsFile = "no hosts file : %s" ErrHostsIsFolder = "the hosts file cannot be a folder : %s" )
Functions ¶
func GetConfigFilesName ¶
GetConfigFilesName 获取配置信息文件夹中的配置文件
func GetConfigHostDir ¶
func GetConfigHostDir() string
func GetHostFileDir ¶
func GetHostFileDir() string
func GetHostFilePath ¶
func GetHostFilePath() string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.