utils

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  = 1024
	KB = B * 1024
	MB = KB * 1024
	GB = KB * 1024
	TB = GB * 1024
	PB = TB * 1024
)

Variables

This section is empty.

Functions

func BeautifyUnit

func BeautifyUnit(size int64) (unit, value string)

*

  • 美化格式化 转 单位 和 值

func BeautifyValue

func BeautifyValue(size int64) string

*

  • 美化格式化 转 字符串 (值 单位)
  • 2048B -> 2 K

func ExecGit added in v0.1.6

func ExecGit(commands ...string) (err error)

*

  • 执行系统git命令
  • 安装hook

func ExecGitV2 added in v0.1.6

func ExecGitV2(commands ...string) (err error)

*

  • 执行系统git命令
  • 安装hook

func GetLocalIp added in v0.1.6

func GetLocalIp() (ip string, err error)

func Scan added in v0.1.6

func Scan(debug *debug.Debug, path string) (result []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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