Documentation ¶
Index ¶
- func ArgsToEntryValues(args []string, addTimeStamp time.Time, rawTimeStamp string) (data.ProjectName, time.Time, string, error)
- func ArgsToTodo(args []string, addTimeStamp time.Time, rawTimeStamp string) (data.ProjectName, data.Todo, error)
- func Debug(args ...interface{})
- func DefaultOrRawTimestamp(timestamp time.Time, raw string) (time.Time, error)
- func DefaultStore(datadir string) (store.Store, error)
- func ErrExit(err error)
- func Fatal(args ...interface{})
- func ProjectNamesFromArgs(store store.Store, args []string, showarchive bool) (data.Projects, error)
- func RecordEntry(datadir string, project data.ProjectName, entry data.Entry, commit bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArgsToEntryValues ¶
func ArgsToEntryValues(args []string, addTimeStamp time.Time, rawTimeStamp string) ( data.ProjectName, time.Time, string, error)
ArgsToEntryValues will take the given args and try to parse the parameters and flags to the values a normaly entry (note, todo, etc.) would need.
func ArgsToTodo ¶
func ArgsToTodo(args []string, addTimeStamp time.Time, rawTimeStamp string) (data.ProjectName, data.Todo, error)
ArgsToTodo will take the given args and parameters and try to convert them to a todo.
func DefaultOrRawTimestamp ¶
DefaultOrRawTimestamp will compare the timestamp and the raw timestamp to each other and return the given timestamp if the raw and the timestamp are the same. Else it will parse the raw timestamp and return that. This is mostly used for determining if a timestamp flag was given or not (see commands package).
func DefaultStore ¶
DefaultStore will return the default store used in the software. This is only to make it easy to change the store type.
func ErrExit ¶
func ErrExit(err error)
ErrExit will check if the underlying error is nil and if its not it will print a debug and fatal message and exit the program.
func Fatal ¶
func Fatal(args ...interface{})
Fatal is a shortcut to log fatal messages. This will exit the program after printing the message.
func ProjectNamesFromArgs ¶
func ProjectNamesFromArgs(store store.Store, args []string, showarchive bool) (data.Projects, error)
ProjectNamesFromArgs will return all projects or all projects with subprojects if the length of the args is not 0.
func RecordEntry ¶
RecordEntry will record the given entry for the given project using the specified datadir. This is mostly a helper function which will inizialize the store and then record the entry to the store.
Types ¶
This section is empty.