Created
September 3, 2022 18:50
-
-
Save madflojo/d910f4a72e666068f2310f088f0f3583 to your computer and use it in GitHub Desktop.
ThreadSafe Packages
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 provides the ability to store and lookup people. | |
type Directory struct { | |
sync.RWMutex | |
// directory stores known People | |
directory map[string]Person | |
// name is used to identify the Directory instance | |
name string | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment