Documentation
¶
Overview ¶
github.com/ixugo/netpulse 有更多关于 ip 的处理
Index ¶
- Constants
- func Abs(path string) (string, error)
- func CleanOldFiles(files []FileInfo, count int) (int, error)
- func CompareVersionFunc(a, b string, f func(a, b string) bool) bool
- func ErrPrintf(format string, a ...any)
- func Executable() string
- func ExternalIP() (string, error)deprecated
- func GetDirSize(path string) (int64, error)
- func Getwd() string
- func LocalIP() stringdeprecated
- func PortUsed(mode string, port int) bool
- func RemoveEmptyDirs(ctx context.Context, rootDir string, start, end time.Time) error
- func WarnPrintf(format string, a ...any)
- type FileBackup
- type FileInfo
Constants ¶
View Source
const ( Reset = "\033[0m" // 重置颜色 Red = "\033[31m" // 红色 Green = "\033[32m" // 绿色 Yellow = "\033[33m" // 黄色 Blue = "\033[34m" // 蓝色 )
Variables ¶
This section is empty.
Functions ¶
func CompareVersionFunc ¶
CompareVersionFunc 比较 ip 或 版本号是否一致
func ExternalIP
deprecated
func RemoveEmptyDirs ¶
RemoveEmptyDirs 删除空目录,性能优化版,增加时间范围过滤
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)
Click to show internal directories.
Click to hide internal directories.