- take in slice of
Transaction
structstype Transaction struct { Value int Timestamp time.Time }
- group them by truncating timestamp down to closest ‘hour’, ‘day’, ‘week’, ‘month’
- keeps latest transaction
go build
./graph-grouping-exercise test-data/example-transactions-1.json hour
call the executable with path to input data json and interval
nix develop
go build
./graph-grouping-exercise test-data/example-transactions-1.json hour
by passing in your data structures