Simulate a building with multiple elevators and floors carrying passengers to their destinations.
Used as a golang learning exercise.
- basic language constructs:
- structs, channels, interfaces, go routines etc.
math/rand
package for generation of new passengerstime
package fortime.Ticker
functionality (simulate travel time of elevators)sync
package for coordination of program flowsync.WaitGroup
to determine when program should terminate (i.e. all passengers have reached their destination)sync.Map
to enable concurrent read/write access to passengers
log
package for simple loggingos
package for creating and writing to files