Skip to content

Instantly share code, notes, and snippets.

@madflojo
Created September 3, 2022 19:11
Show Gist options
  • Save madflojo/8b31a6fc33970d43d9206d271ef4865c to your computer and use it in GitHub Desktop.
Save madflojo/8b31a6fc33970d43d9206d271ef4865c to your computer and use it in GitHub Desktop.
ThreadSafe Packages - Directory Method
// 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