Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvToken = "PD_SERVICE_KEY" EnvDebug = "DUTYME_DEBUG" EnvTrace = "DUTYME_TRACE" )
View Source
const ( ExitCodeOK = iota ExitCodeError )
View Source
const ( // DefaultWorkingTime is default duration of override. DefaultWorkingTime = 1 * time.Hour // TimeFmt is used for displaying time TimeFmt = "2006-01-02 15:04:05-0700" )
View Source
const (
DefaultConfigName = ".dutyme.json"
)
Variables ¶
View Source
var ( Debug bool Trace bool )
Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf prints debug information when debug env var has non-empty value. If not, it does nothing.
func TracePrint ¶
Trace prints pkg/errors stack trace information when trace env var has non-empty value. If not, it does nothing.
Types ¶
type Meta ¶
Meta contain the meta-option that nearly all subcommand inherited.
func (*Meta) ConfigPath ¶
type StartCommand ¶
type StartCommand struct {
Meta
}
func (*StartCommand) Help ¶
func (c *StartCommand) Help() string
func (*StartCommand) Run ¶
func (c *StartCommand) Run(args []string) int
func (*StartCommand) Synopsis ¶
func (c *StartCommand) Synopsis() string
type VersionCommand ¶
func (*VersionCommand) Help ¶
func (c *VersionCommand) Help() string
func (*VersionCommand) Run ¶
func (c *VersionCommand) Run(args []string) int
func (*VersionCommand) Synopsis ¶
func (c *VersionCommand) Synopsis() string
Click to show internal directories.
Click to hide internal directories.