Documentation ¶
Index ¶
- func CmdFromContext(ctx context.Context) (string, bool)
- func DebugFromContext(ctx context.Context) bool
- func NewCmdContext(ctx context.Context, debug bool) context.Context
- func PidFromContext(ctx context.Context) (int, bool)
- type CmdLogger
- func (cl *CmdLogger) Debug(v ...interface{})
- func (cl *CmdLogger) Debugf(format string, v ...interface{})
- func (cl *CmdLogger) Debugln(v ...interface{})
- func (cl *CmdLogger) Print(v ...interface{})
- func (cl *CmdLogger) Printf(format string, v ...interface{})
- func (cl *CmdLogger) Println(v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdFromContext ¶
CmdFromContext returns the program name value from the provided Context.
func DebugFromContext ¶
DebugFromContext returns if debug is enabled in the provided Context.
func NewCmdContext ¶
NewCmdContext returns a new Context with program name, process id, and debug values.
Types ¶
Click to show internal directories.
Click to hide internal directories.