debug

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debug

type Debug struct {
	Command         *cobra.Command // cobra command
	CombinationKey  bool           // debug flag key is combination key, default true. Command.Use+"-debug"
	Mode            Mode           // 运行模式
	AutoAppendEntry bool           // auto append entry

}

func NewDebug

func NewDebug(c *cobra.Command) *Debug

func (*Debug) AppendEntry

func (d *Debug) AppendEntry(source string) string

func (*Debug) Debug

func (d *Debug) Debug(developFormat string, parameters ...interface{})

func (*Debug) EnableDebug

func (d *Debug) EnableDebug() (debug bool)

func (*Debug) FillSpace

func (d *Debug) FillSpace(width int, middle, value string) string

*

  • 填充空格

func (*Debug) Release

func (d *Debug) Release(releaseFormat string, parameters ...interface{})

func (*Debug) Show

func (d *Debug) Show(developFormat, releaseFormat string, parameters ...interface{})

func (*Debug) ShowSame

func (d *Debug) ShowSame(format string, parameters ...interface{})

type Mode

type Mode int
const (
	DEVELOP Mode = 1 // 开发模式
	RELEASE Mode = 2 // 发行模式
)

Jump to

Keyboard shortcuts

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