Documentation
¶
Index ¶
- Constants
- Variables
- func Env(envPrefixes ...string) func(string) string
- func EnvJoin(tail string, envPrefixes ...string) string
- func LogTimesheetDiagnostics(cmd *cobra.Command, err error)
- func ProcessTimesheet(cmd *cobra.Command, sheet *timesheet.Timesheet, ...) ([]timesheet.ProcessedEntry, error)
- func SetVerbosity(verbosity int)
- type Err
Constants ¶
const ( VerboseFlag = "verbose" VerboseShortFlag = "v" VerboseFlagDefaultValue = 0 )
Exportable flags
const ( // AppName reflects the application name AppName = "fyt" // AppEnv reflects application environment prefix. AppEnv = "FYT" // CobraGroupMain reflects main application group CobraGroupMain = "Main" // CobraGroupAux reflects auxiliaries application group CobraGroupAux = "Aux" )
Variables ¶
var GlobalFlags = &pflag.FlagSet{}
GlobalFlags keeps package global flat-set entry
Functions ¶
func Env ¶
Env provides a helper to join environment variable prefixes together and return one argument function as a helper.
func LogTimesheetDiagnostics ¶
LogTimesheetDiagnostics reports each input problem once through the command's logger.
func ProcessTimesheet ¶
func ProcessTimesheet(cmd *cobra.Command, sheet *timesheet.Timesheet, processing v1alpha1.ProcessingConfig) ([]timesheet.ProcessedEntry, error)
ProcessTimesheet validates the source entries, handles duplicates and checks overlaps.