Calculate the fuel price in kilometers.
v1
is a basic terminal application.v2
is a CLI tool, that can be used in your terminal.
Make sure you have Go
installed on your machine.
You can download it by visiting the official downloads page.
To use fuel-calc from any terminal, you'll need to clone the repository first
git clone https://github.com/Edchja/fuel-calc.git
Next, install fuel-calc, with
go install
ℹ️ Make sure you are in the root directory of the project.
Now, you can use the command fuel-calc
from any terminal window 🚀
To use the v1
version of fuel-calc, you can run the following command in your terminal
go run main.go
You'll be prompted to enter the fuel consumption and the fuel price.
To use the CLI tool, you can run the following command in your terminal
fuel-calc -h # Show's the help message
Example usage:
fuel-calc 17 1.99
Output: The price per kilometer is: 0.34 €