.gitignore | ||
go.mod | ||
main_test.go | ||
main.go | ||
README.md |
ketotrack
Simple GKI calculator written as an exercise in learning Go.
Currently, this only calculates your GKI and stores the results into a JSON file. At some point I'll get around to implementing note-taking and time-series display.
Usage
After measuring your blood glucose and blood ketone levels, run ketotrack
. GKI will be displayed along with
the level of ketosis you are in according to Keto-Mojo:
Enter glucose reading (mg/dL): 77
Enter ketone reading (mmol/L): 1.1
Your GKI is: 3.89
You're in a moderate level of ketosis.
Reading data will be saved to $HOME/.ketotrack/readings.json
.
Building and Installing
go build
mv ketotrack $HOME/.local/bin
Refactoring Notes
- Create
Record
andNote
struct types - Add
GKI
field toReading
struct type - Encapsulate application data with an
AppContext
struct that holds aRecords
sliceLoadRecords
,SaveRecords
,AddReading
,AddNote
receiver methods
- Add interactive menu for adding either a
Note
or aRecord
- Standardize method names for getting user input to
handleNewNote
andhandleNewReading