Documentation ¶
Index ¶
Constants ¶
View Source
const ( // names of fields NameItem = "item" NameCost = "cost" NameLocation = "location" NameCategory = "category" NameSource = "source" NameNotes = "notes" NameDate = "date" // prompt questions PromptItem = "What did you buy?" PromptCost = "Cost?" PromptLocation = "Where did you buy this?" PromptCategory = "Please select the item's categories" PromptSource = "Source of Funds?" PromptNotes = "Any notes?" PromptDate = "Transaction date" PromptOtherDate = "Enter the date" // date options DateToday = "Today" DateYesterday = "Yesterday" DateDayBefore = "Day before" DateOther = "Other" DateFormat = "2006/01/02" )
Variables ¶
View Source
var Version = "devel"
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func GetTransactionDate ¶
Types ¶
type Configuration ¶
type Configuration struct { DbName string `mapstructure:"dbName"` DisableDb bool `mapstructure:"disableDb"` CsvName string `mapstructure:"csvName"` DisableCSV bool `mapstructure:"disableCSV"` Categories []string `mapstructure:"categories"` Funds []string `mapstructure:"funds"` DisableResult bool `mapstructure:"disableResult"` }
type TransactionInfo ¶
type TransactionInfo struct {
// contains filtered or unexported fields
}
func (*TransactionInfo) FormatAsString ¶
func (t *TransactionInfo) FormatAsString() []string
func (*TransactionInfo) RenderTransactionTable ¶
func (t *TransactionInfo) RenderTransactionTable()
func (*TransactionInfo) WriteTransactionToCSV ¶
func (t *TransactionInfo) WriteTransactionToCSV(file *os.File)
func (*TransactionInfo) WriteTransactionToDB ¶
func (t *TransactionInfo) WriteTransactionToDB(database *sql.DB)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.