Created
September 3, 2022 19:11
-
-
Save madflojo/8b31a6fc33970d43d9206d271ef4865c to your computer and use it in GitHub Desktop.
ThreadSafe Packages - Directory Method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Directory will return a map of all people stored within the Directory. | |
func (d *Directory) Directory() map[string]Person { | |
d.RLock() | |
defer d.RUnlock() | |
return d.directory | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment