Welcome to the README for Arrivals Lounge, a terminal-based application for displaying live flight arrivals data.
- Description
- Features
- Technologies Used
- Installation
- Usage
- Project Structure
- Contributing
- Contact
- Testing
Arrivals Lounge is a Go-based terminal application that fetches live flight arrivals data from the FlightAware API, formats it into an arrivals board with anticipated delays, and displays it to the user. Built from scratch by Oli Kelly, this application provides real-time flight information for any chosen airport.
- Fetch live flight arrivals data for any airport using its IATA code
- Display formatted arrivals board in the terminal
- Show anticipated delays for incoming flights
- Easy-to-use command-line interface
- Backend: Go (Golang)
- External API: FlightAware API
- Version Control: Git
To run Arrivals Lounge locally, you'll need to install:
-
Clone the repository:
git clone https://github.com/olikelly00/arrivals-lounge.git
-
Navigate to the project directory:
cd arrivals-lounge
-
Install dependencies (if any are not included in go.mod):
go mod tidy
- Ensure you have set up your FlightAware API credentials in the
.env
file. - Run the application with the IATA code for your chosen airport:
Replace
go run main.go LHR
LHR
with the IATA code of any airport you want to check.
The Arrivals Lounge project is organized as follows:
main.go
: Entry point of the programgo.mod
: Lists all the modules (external packages) the project depends ongo.sum
: Contains checksums for all the dependenciesREADME.md
: Project documentation (this file).env
: Environment variables file (not tracked in git).gitignore
: Specifies files to be ignored by gitflights/
: Package containing flight-related functionalityflights.go
: Defines flight struct and display functionjson.go
: Functions for fetching flight data from APIflight_test.go
: Unit tests for flight package
test_utils/
: Utility functions for testingrecording.go
: Possibly for recording API responses for tests
flightData.json
: Sample flight data for testing or developmenttestFile.json
: Additional test data file
Contributions to Arrivals Lounge are welcome! Please feel free to submit a Pull Request.
For any questions or feedback, please contact Oli Kelly:
- GitHub: @olikelly00
Arrivals Lounge uses Go's built-in testing framework. To run the tests, follow these steps:
-
Ensure you are in the project root directory.
-
Run all tests with:
go test ./...
-
To run tests for a specific package:
go test ./flights
-
For verbose output, add the
-v
flag:go test -v ./...
-
To run a specific test function:
go test -v ./flights -run TestFunctionName
Replace
TestFunctionName
with the name of the test function you want to run.
For more information on Go testing, refer to the official Go testing documentation.