⌯Go Conference Booking App (View on GitHub)
This is a simple booking CLI application for the Go Conference. It allows users to book tickets for the conference, tracks the remaining tickets, and sends a confirmation email to the user.
To run the application, follow these steps:
- Ensure you have Go installed on your machine.
- Clone the repository or download the code files.
- Open a terminal or command prompt and navigate to the project directory.
- Run the following command to build and run the application:
go run .
The Go Conference 2023 Booking App offers the following features:
- User Input: Users are prompted to enter their first name, last name, email, and the number of tickets they want to book.
- Validation: User inputs are validated to ensure the name is not too short, the email contains an "@" sign, and the number of tickets is valid.
- Booking Tickets: If the user input is valid, the application books the tickets, updates the remaining ticket count, and stores the user data.
- Email Confirmation: A separate goroutine is used to send a confirmation email to the user, simulating a delay with a sleep function.
- Display Bookings: After each successful booking, the application displays the list of all bookings made so far, showing the first names of the attendees.
- Ticket Availability: The application checks the remaining ticket count and informs the user if all tickets have been sold out.
- Concurrency: The program uses the
sync.WaitGroup
to ensure that the email goroutine completes before the program exits.
The Go Conference 2023 Booking App has no external dependencies.
Contributions to this project are welcome! If you find any issues or want to add new features, please open an issue or submit a pull request.