Documentation ¶
Index ¶
- Variables
- func CopyFile(srcFileName string, dstFileName string) (written int64, err error)
- func CreateOrUpdateFile(c *gin.Context)
- func CurrentHosts(c *gin.Context)
- func FileContent(c *gin.Context)
- func InitConfigBuildEnv()
- func ListFile(c *gin.Context)
- func OnExit()
- func OnReady()
- func QueryMode(c *gin.Context)
- func SwitchFileState(c *gin.Context)
- func WebServer(f embed.FS, port string)
- type FileItemVO
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DebugStatic bool Version bool LogPath string DebugHostFile bool // 使用默认Debug文件 FinalHostFile string // 入参指定hosts文件 MainPath string ChangeFileHook string SupportMode string Port int PortStr string )
View Source
var Info = cuibase.HelpInfo{ Description: "Hosts Group, switch host tool", Version: "1.4.2", SingleFlagLen: -2, DoubleFlagLen: 0, ValueLen: -5, Flags: []cuibase.ParamVO{ {Short: "-h", Comment: "help info"}, {Short: "-f", Comment: "set main hosts file"}, {Short: "-m", Comment: "main config file"}, {Short: "-mode", Comment: "support mode: hosts,nginx"}, {Short: "-cmd", Comment: "the cmd run after generate hosts file"}, {Short: "-d", Comment: "debug mode, use test dir and host-file"}, {Short: "-D", Comment: "debug static mode, use static dir not embed packaged"}, {Short: "-v", Comment: "version"}, }, Options: []cuibase.ParamVO{ {Short: "-l", Value: "path", Comment: "log path"}, }, }
Functions ¶
func CreateOrUpdateFile ¶
func CurrentHosts ¶
func FileContent ¶
func SwitchFileState ¶
Types ¶
type FileItemVO ¶
Click to show internal directories.
Click to hide internal directories.