This project is a simple Command Line Interface (CLI) application written in Go. It takes user input for names, items with their prices, and tips, then generates a bill and saves it in a .txt
file.
- Accepts user input for customer names, items, and prices
- Calculates the total bill including tips
- Generates a formatted bill
- Saves the bill to a
.txt
file
Before you begin, ensure you have met the following requirements:
- You have Go installed on your machine.
-
Clone this repository to your local machine:
git clone https://github.com/likhithkp/go-bill-generator.git cd go-bill-generator
-
Build the application:
go build -o go-bill-generator
-
Run the application:
./go-bill-generator or go run main.go bill.go
-
Follow the on-screen prompts to enter the required information:
- Enter the customer's name.
- Enter the items and their prices.
- Enter the tip amount.
-
After entering all the required information, the application will generate a bill and save it in a
.txt
file.
Bill breakdown:
- Whiskers Biscuit: ...$4.99
- Shiba toys: ...$5.89
- CheeseCake: ...$2.99
- tip : ...$15.50
- total : ...$29.37