chore(planning): trying something new, actually planning before making

This commit is contained in:
DarthMooMancer committed 2026-11-12 10:54:02 -05:00
1 parent 8b9d223cb1
commit fa02041867
2 files changed
+111 -2

No files matched your search

+1
View File
@@ -6,3 +6,4 @@
.env
.env.*
bin/
+110 -2
View File
@@ -1,7 +1,115 @@
package main
import ("fmt")
import (
"fmt"
)
/*
Id int
Desc string
Amount float
Date date.now()
*/
type Expense struct {
}
/*
--description: Label for the expense : string
--amount how much it cost : float
saves date as well
returns an expense table to be saved later
*/
/*
$ expense-tracker add --description "Lunch" --amount 20
# Expense added successfully (ID: 1)
$ expense-tracker add --description "Dinner" --amount 10
# Expense added successfully (ID: 2)
*/
func add(fileName string, desc string, amount float32) []Expense {
/*
1. Takes in a fileName and loades an Expense slice
2. Creates a new Expense object with id++ of last id in Expense slice, date, desc and amount
3. return Expense slice
*/
}
/*
$ expense-tracker list
# ID Date Description Amount
# 1 2024-08-06 Lunch $20
# 2 2024-08-06 Dinner $10
*/
func list() {
/*
1. Load tasks
2. Print a single newline statement for section headers
3. Loop over tasks and print id, date, descript, amount
*/
}
/*
$ expense-tracker delete --id 2
# Expense deleted successfully
takes Id and loops over loaded tasks to remove object
*/
func delete() {
}
/*
$ expense-tracker update --id 2 --description "new desc"
# Expense updated successfully
$ expense-tracker update --id 2 --amount 10
# Expense updated successfully
$ expense-tracker update --id 2 --description "new desc" --amount 10
# Expense updated successfully
takes in an id, a string for desc (if "" then it is blank and dont update), a new amount (if -1 then it is blank and dont update)
*/
func update() {
}
/*
$ expense-tracker summary
# Total expenses: $30
$ expense-tracker summary
# Total expenses: $20
$ expense-tracker summary --month 8
# Total expenses for August: $20
*/
func summary() {
/*
1. Loads expenses to slice
2. Count all amounts from each expense
3. print expenses
3.5 If month passed in then print all expenses for that month and only count for those months
*/
}
// Saves expenses table to a json file <expenses.json>
func saveExpenses() {
}
// Loades expenses table from a json file <expenses.json>
func loadExpenses() {
}
func main() {
fmt.Println("Hello World")
fmt.Println("Hello World")
}