tools

package
v0.0.0-...-a573a6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package tools 存放辅助方法

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentInfo

func CurrentInfo(nets, disks []string) types.CurrentInfo

CurrentInfo 获取监控数据

func FormatBytes

func FormatBytes(size float64) string

FormatBytes 格式化bytes

func GetLocalIPv4

func GetLocalIPv4() (string, error)

GetLocalIPv4 获取本地IPv4

func GetLocalIPv6

func GetLocalIPv6() (string, error)

GetLocalIPv6 获取本地IPv6

func GetPublicIPv4

func GetPublicIPv4() (string, error)

GetPublicIPv4 获取公网IPv4

func GetPublicIPv6

func GetPublicIPv6() (string, error)

GetPublicIPv6 获取公网IPv6

func IsChina

func IsChina() bool

IsChina 是否中国大陆

func RestartPanel

func RestartPanel()

RestartPanel 重启面板

Types

type NoopLogger

type NoopLogger struct{}

NoopLogger 给 go-resty 使用的空日志

func (NoopLogger) Debugf

func (NoopLogger) Debugf(format string, v ...any)

func (NoopLogger) Errorf

func (NoopLogger) Errorf(format string, v ...any)

func (NoopLogger) Warnf

func (NoopLogger) Warnf(format string, v ...any)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL