xdebug

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

功能:命令行参数 说明:

功能:调试相关 说明: 所有debug标志统一在xdebug中设置

功能:goroutine信息 说明:

功能: 说明:

功能:生命周期 说明: 1 输出函数运行时间[单位秒]

功能: 说明:

功能:系统信息 说明: 1 Golang实践录:获取系统信息 https://juejin.cn/post/7104069654733144078

Index

Constants

View Source
const (
	FUNC_ENTER = "进入函数"
	FUNC_EXIT  = "退出函数"
)

Variables

This section is empty.

Functions

func Assert added in v0.0.20

func Assert(b bool)

Assert debug断言

func Funcname

func Funcname() string

Funcname 调用函数名

func Go_id

func Go_id() int64

Go_id 得到goroutine的id

func Init_logrus

func Init_logrus()

Init_logrus logrus日志初始化设置

func Is_debug

func Is_debug() bool

Is_debug 是否调试模式

func Set_release

func Set_release()

Set_release 设置发布模式

func Wait_for_signal added in v0.0.19

func Wait_for_signal()

Wait_for_signal 等待进程结束信号

Types

type CmdParamsBase added in v0.0.13

type CmdParamsBase struct {
	Debug        bool   `short:"d" long:"debug" description:"是否debug"`
	Log_filename string `short:"l" long:"log_filename" description:"日志文件名"`
	Config_file  string `short:"c" long:"config_file" description:"配置文件"`
}

CmdParamsBase 命令行参数

type LSysInfo

type LSysInfo struct {
	MemAll         uint64
	MemFree        uint64
	MemUsed        uint64
	MemUsedPercent float64
	Days           int64
	Hours          int64
	Minutes        int64
	Seconds        int64

	CpuUsedPercent float64
	OS             string
	Arch           string
	CpuCores       int
}

func Get_sys_info

func Get_sys_info() (info LSysInfo)

Get_sys_info 获取系统信息

type LifeTime

type LifeTime struct {
	// contains filtered or unexported fields
}

LifeTime 生命周期

func (*LifeTime) End

func (l *LifeTime) End()

End 结束

func (*LifeTime) Start

func (l *LifeTime) Start()

Start 开始

Jump to

Keyboard shortcuts

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