debug

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: 3 Imported by: 0

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