This commit is contained in:
aozhiwei 2024-06-24 16:25:06 +08:00
parent 3fd6e2b00f
commit 26a295a66c

View File

@ -71,3 +71,11 @@ func (this *MailTable) loadMail(mailName string) {
} }
this.nameHash.Store(mailName, p) this.nameHash.Store(mailName, p)
} }
func (this *MailTable) GetMailByName(mailName string) *Mail {
if v, ok := this.nameHash.Load(mailName); ok {
return *v
} else {
return nil
}
}