Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/likhithkp/go-bill-generator
Simple CLI tool, saves and generates the bill in .txt format
https://github.com/likhithkp/go-bill-generator
bufio go golang os
Last synced: 16 days ago
JSON representation
Simple CLI tool, saves and generates the bill in .txt format
- Host: GitHub
- URL: https://github.com/likhithkp/go-bill-generator
- Owner: likhithkp
- Created: 2024-05-21T04:57:09.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-24T16:45:57.000Z (7 months ago)
- Last Synced: 2024-12-11T17:53:29.068Z (23 days ago)
- Topics: bufio, go, golang, os
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLI Billing System in Go
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.
## Features
- 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## Prerequisites
Before you begin, ensure you have met the following requirements:
- You have [Go](https://golang.org/doc/install) installed on your machine.
## Installation
1. Clone this repository to your local machine:
```bash
git clone https://github.com/likhithkp/go-bill-generator.git
cd go-bill-generator
```2. Build the application:
```bash
go build -o go-bill-generator```
## Usage
1. Run the application:
```bash
./go-bill-generatoror
go run main.go bill.go
```2. 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.3. After entering all the required information, the application will generate a bill and save it in a `.txt` file.
## Bill format
Bill breakdown:
- Whiskers Biscuit: ...$4.99
- Shiba toys: ...$5.89
- CheeseCake: ...$2.99
- tip : ...$15.50
- total : ...$29.37