Calculate the fuel price in kilometers.
v1is a basic terminal application.v2is 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.gitNext, 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.goYou'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 messageExample usage:
fuel-calc 17 1.99Output: The price per kilometer is: 0.34 €