Documentation ¶
Index ¶
- Constants
- func TimeEntriesCSVPrint(timeEntries []dto.TimeEntry, out io.Writer) error
- func TimeEntriesJSONPrint(t []dto.TimeEntry, w io.Writer) error
- func TimeEntriesMarkdownPrint(tes []dto.TimeEntry, w io.Writer) error
- func TimeEntriesPrint(opts ...TimeEntryOutputOpt) func([]dto.TimeEntry, io.Writer) error
- func TimeEntriesPrintQuietly(timeEntries []dto.TimeEntry, w io.Writer) error
- func TimeEntriesPrintWithTemplate(format string) func([]dto.TimeEntry, io.Writer) error
- func TimeEntriesTotalDurationOnlyAsFloat(timeEntries []dto.TimeEntry, w io.Writer) error
- func TimeEntriesTotalDurationOnlyFormatted(timeEntries []dto.TimeEntry, w io.Writer) error
- func TimeEntryJSONPrint(t dto.TimeEntry, w io.Writer) error
- type TimeEntryOutputOpt
- type TimeEntryOutputOptions
Constants ¶
const ( TimeFormatFull = "2006-01-02 15:04:05" TimeFormatSimple = "15:04:05" )
Variables ¶
This section is empty.
Functions ¶
func TimeEntriesCSVPrint ¶
TimeEntriesCSVPrint will print each time entry using the format string
func TimeEntriesJSONPrint ¶
TimeEntriesJSONPrint will print as JSON
func TimeEntriesMarkdownPrint ¶
TimeEntriesMarkdownPrint will print time entries in "markdown blocks"
func TimeEntriesPrint ¶
TimeEntriesPrint will print more details
func TimeEntriesPrintQuietly ¶
TimeEntriesPrintQuietly will only print the IDs
func TimeEntriesPrintWithTemplate ¶
TimeEntriesPrintWithTemplate will print each time entry using the format string
func TimeEntriesTotalDurationOnlyAsFloat ¶
TimeEntriesTotalDurationOnlyAsFloat will only print the total duration as float
func TimeEntriesTotalDurationOnlyFormatted ¶
TimeEntriesTotalDurationOnlyFormatted will only print the total duration as float
Types ¶
type TimeEntryOutputOpt ¶
type TimeEntryOutputOpt func(*TimeEntryOutputOptions) error
TimeEntryOutputOpt allows the setting of TimeEntryOutputOptions values
func WithShowTasks ¶
func WithShowTasks() TimeEntryOutputOpt
WithShowTasks shows a new column with the task of the time entry
func WithTimeFormat ¶
func WithTimeFormat(format string) TimeEntryOutputOpt
WithTimeFormat sets the date-time output format
func WithTotalDuration ¶
func WithTotalDuration() TimeEntryOutputOpt
WithTotalDuration shows a footer with the sum of the durations of the time entries
type TimeEntryOutputOptions ¶
TimeEntryOutputOptions sets how the "table" format should print the time entries