Skip to content

A Conference Booking CLI Application written in GO (GoLang).

Notifications You must be signed in to change notification settings

utkarshchouhan/booking-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a program that simulates a ticket booking system for a conference. It has the following functionality:

- It greets the users and displays the number of remaining tickets.
- It prompts the user to enter their first name, last name, email address, and the number of tickets they want to book.
- It validates the user input: the first and last names must have at least 2 characters each, the email address must contain an '@' symbol, and the number of tickets must be a positive integer that does not exceed the number of remaining tickets.
- If the user input is valid, the program books the tickets by updating the list of bookings and decrements the number of remaining tickets. It also sends a confirmation email after a 50 second delay (simulated with time.Sleep).
- If the user input is invalid, the program displays an error message indicating the invalid field(s).
- The program terminates when the number of remaining tickets becomes 0.