How atamaibi/golang-tax-calculator works
This is a small Go tax calculator. Its main workflow runs the same input prices through four tax rates, writes each calculation as JSON, and prints a comparison table. The main program owns job setup and output presentation; each job loads prices, calculates tax-inclusive amounts, rounds them, and writes its result. The graph reflects only relationships shown in the excerpts; it does not assume behavior beyond them.
Main entry points: main.go Run tax jobs · prices.go Tax price job · filemanager.go File manager · printATable.go Comparison table
Components 9
Application workflow
- Run tax jobs
main.go
Price calculation
- Tax price job
prices/prices.go - Price rounding
conversion/conversion.go
File and display
- File manager
filemanager/filemanager.go - Price input
prices.txt - JSON results
result_0.json - Comparison table
printtable/printATable.go
Other components
- User
- Terminal output
Connections 10
- User → Run tax jobs: runs
- Run tax jobs → Tax price job: creates jobs
main.go - Tax price job → File manager: reads prices
prices/prices.go - File manager → Price input: reads
filemanager/filemanager.go - Tax price job → Price rounding: rounds amounts
prices/prices.go - Tax price job → File manager: writes JSON
prices/prices.go - File manager → JSON results: writes
filemanager/filemanager.go - Run tax jobs → Comparison table: prints records
main.go - Comparison table → Terminal output: prints table
printtable/printATable.go - Run tax jobs → Terminal output: prints details
main.go