states

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUnderDebugger added in v0.6.0

func IsUnderDebugger() bool

IsUnderDebugger detects if golang debugger 'dlv' is controlling this process.

Only for Linux, Darwin and Windows, need more completely test.

func UpdateEnvWith

func UpdateEnvWith(environ CmdrMinimal)

Types

type CmdrMinimal

type CmdrMinimal interface {
	InDebugging() bool      // is debug build
	GetDebugMode() bool     // is debug build or the debug-mode flag is true, settable by `--debug`
	SetDebugMode(b bool)    //
	GetDebugLevel() int     // return debug level as a integer, 0..n, it represents count of `--debug` or set by caller explicitly
	SetDebugLevel(hits int) //

	GetTraceMode() bool     //  the trace-mode flag, settable by `--trace`
	SetTraceMode(b bool)    //
	GetTraceLevel() int     // return trace level as a integer, 0..n, it represents count of `--trace` or set by caller explicitly
	SetTraceLevel(hits int) //

	IsNoColorMode() bool      // settable by `--no-color`
	SetNoColorMode(b bool)    //
	CountOfNoColor() int      //
	SetNoColorCount(hits int) //

	IsVerboseMode() bool      // settable by `--verbose` or `-v`
	IsVerboseModePure() bool  //
	SetVerboseMode(b bool)    //
	CountOfVerbose() int      //
	SetVerboseCount(hits int) //

	IsQuietMode() bool      // settable by `--quiet` or `-q`
	SetQuietMode(b bool)    //
	CountOfQuiet() int      //
	SetQuietCount(hits int) //
}

CmdrMinimal provides the accessors to debug/trace flags

func Env

func Env() CmdrMinimal

type Process added in v0.6.0

type Process interface {
	// Pid is the process ID for this process.
	Pid() int

	// PPid is the parent process ID for this process.
	PPid() int

	// Executable name running this process. This is not a path to the
	// executable.
	Executable() string
}

Process interface.

Part of findProcess, there's no plan to implement it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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