Improve memory efficiency of noticesToBeSent by mapping pointers instead of WidNotice structs
This commit is contained in:
parent
295ceec3de
commit
9b00959fdb
4 changed files with 8 additions and 7 deletions
|
@ -25,7 +25,7 @@ type WidNotice struct {
|
|||
PortalUrl string
|
||||
}
|
||||
|
||||
func noticeSliceContains(notices []WidNotice, notice WidNotice) bool {
|
||||
func noticeSliceContains(notices []*WidNotice, notice *WidNotice) bool {
|
||||
for _, x := range notices {
|
||||
if x.Uuid == notice.Uuid {
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue