A golang application to mock the train reservation system
Features
- View all passenger details
- Add user to the train passengers list
- Book tickets for a passenger
Usage
- Move to
cmd/reservation
directory - Run
go mod init
&go mod tidy
to creatego.mod
&go.sum
files - Run the cmd.exe file with flags
- get
- all (to view all passengers details)
- id (to view user by id)
- users (to view passengers list alone)
- add (to add new user)
- book-ticket
- id (to book ticket for a user)