Documentation ¶
Index ¶
- Variables
- func CleanOldFiles(path string, count int) error
- func CompareVersionFunc(a, b string, f func(a, b string) bool) bool
- func ExecCommand(ctx context.Context, args []string) ([]byte, error)
- func Executable() func() string
- func ExternalIP() (string, error)
- func GetDirSize(path string) (int64, error)
- func LocalIP() string
- func PortUsed(mode string, port int) bool
- func RemoveEmptyDirs(rootDir string) error
- type FileBackup
- type Info
Constants ¶
This section is empty.
Variables ¶
View Source
var GetCWD = Executable()
获取可执行文件绝对路径
Functions ¶
func CleanOldFiles ¶
func CompareVersionFunc ¶
CompareVersionFunc 比较 ip 或 版本号是否一致
func Executable ¶
func Executable() func() string
Types ¶
type FileBackup ¶
type FileBackup struct {
// contains filtered or unexported fields
}
func NewFileBackup ¶
func NewFileBackup(file string) *FileBackup
func (*FileBackup) Close ¶
func (f *FileBackup) Close()
func (*FileBackup) Write ¶
func (f *FileBackup) Write(data []byte)
type Info ¶
type Info struct { IP string `json:"ip"` Pro string `json:"pro"` // 省;安徽省 ProCode string `json:"proCode"` // 省区域代码;340000 City string `json:"city"` // 城市;合肥市 CityCode string `json:"cityCode"` // 城市代码;340100 Region string `json:"region"` // 区域;蜀山区 RegionCode string `json:"regionCode"` // 区域代码;340104 Addr string `json:"addr"` // 完整地址;安徽省合肥市蜀山区 电 RegionNames string `json:"regionNames"` Err string `json:"err"` }
Click to show internal directories.
Click to hide internal directories.