add convenience func for removing entry from slice
This commit is contained in:
parent
d866ba75dd
commit
6e8450d07d
10
pub/util.go
10
pub/util.go
|
@ -399,6 +399,16 @@ func dedupeIRIs(recipients, ignored []*url.URL) (out []*url.URL) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// removeOne removes any occurrences of entry from a slice of entries.
|
||||||
|
func removeOne(entries []*url.URL, entry *url.URL) (out []*url.URL) {
|
||||||
|
for _, e := range entries {
|
||||||
|
if e.String() != entry.String() {
|
||||||
|
out = append(out, e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
// stripHiddenRecipients removes "bto" and "bcc" from the activity.
|
// stripHiddenRecipients removes "bto" and "bcc" from the activity.
|
||||||
//
|
//
|
||||||
// Note that this requirement of the specification is under "Section 6: Client
|
// Note that this requirement of the specification is under "Section 6: Client
|
||||||
|
|
Loading…
Reference in New Issue