Documentation
¶
Index ¶
- Constants
- Variables
- func APPDIR() string
- func CheckAmount(amounts ...*string) error
- func CheckAmountRange(amount *string) error
- func Checkdate(dates ...*string) error
- func CheckdateRange(date *string) error
- func ClearScreen()
- func ConvertToDateFormat(date string) string
- func DBPATH() string
- func ExecShellCmd(command string, args ...string) string
- func HRTime(date string) string
- func IsInitialized() bool
- func IsValidAmountFormat(amount string) bool
- func IsValidDateFormat(date string) bool
- func IsValueRange(value string) bool
- func PadDate(date string) string
- func PrintError(err error, message string, debug bool)
- func PromptConfirmation() bool
- func SplitAmountRange(amountRange string) []string
- func SplitDateRange(dateRange string) []string
- func ToInt(s string) int
Constants ¶
View Source
const ( DateSyntaxError = "invalid date syntax. date must be in a valid format or one of the predefined builtins like today, yesterday" DateRangeSyntaxError = "invalid date range synxtax. Must be one of the following: :date, date:, date:date" AmountSyntaxError = "invalid amount syntax. amount must be in a valid format" AmountRangeSyntaxError = "invalid amount range syntax. must be one of the following: :amount, amount:, amount:amount" )
Variables ¶
View Source
var ValidDateBuiltins = []string{
"today",
"yesterday",
"thisweek",
"lastweek",
"thismonth",
"lastmonth",
"thisyear",
"lastyear",
}
Functions ¶
func CheckAmount ¶
func CheckAmountRange ¶
func CheckdateRange ¶
func ClearScreen ¶
func ClearScreen()
func ConvertToDateFormat ¶
func ExecShellCmd ¶
func IsInitialized ¶
func IsInitialized() bool
func IsValidAmountFormat ¶
func IsValidDateFormat ¶
func IsValueRange ¶
func PrintError ¶
func PromptConfirmation ¶
func PromptConfirmation() bool
func SplitAmountRange ¶
func SplitDateRange ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.