https://github.com/math2001/money
[WIP] Something that keeps track of my expenses
https://github.com/math2001/money
Last synced: 12 months ago
JSON representation
[WIP] Something that keeps track of my expenses
- Host: GitHub
- URL: https://github.com/math2001/money
- Owner: math2001
- License: mit
- Created: 2019-11-26T00:01:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T01:21:09.000Z (over 3 years ago)
- Last Synced: 2025-07-03T02:04:30.764Z (12 months ago)
- Language: Go
- Size: 430 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Money
A project to keep track of the money I spent. All I need is an excel sheet, but
I figured I'd try to build something myself so that I could learn about
encryption and security.
## Contributing
### Conventions
```go
// yes
t.Errorf("should have ErrSomething, got %s", err)
// no
t.Errorf("wrong error, got %s, shoud have ErrSomething", err)
```
Tagging errors:
```go
var ErrTag = errors.New("some tag")
t.Errorf("my specific error %w", ErrTag)
```
Never call `r.ParseForm()`, but `r.ParseMultipartForm()`
## To think about
How should internal errors be handled? How can you design error handling to be
future proof (for eg. `MyFunc() error` never return an `ErrInternal` error in
the current version. What should my error handling look like? Do I just pass up
all the errors I don't know anything about? Should they be tagged then? Should
it even be legal to pass up an unknown error up the stack without tagging?)
A caller shouldn't wrap an error it doesn't know anything about
## Optimisation
This app is absolutely horrible when it comes to perfs. Probably the best thing
to do is to run it under a profiler to see what's the worse. In the mean time,
here are some ideas:
`users.list` should be a sorted list of independent JSON objects (not one big
lists), so that we can stop reading into memory as soon as we found what we
wanted...