Add MultiCookie to make theming easier
This commit is contained in:
parent
9d40ab654a
commit
e63ebdb89e
|
@ -65,3 +65,17 @@ func (broadcaster *FuncBroadcaster) Broadcast () {
|
||||||
listener()
|
listener()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type multiCookie []Cookie
|
||||||
|
|
||||||
|
// MultiCookie creates a single cookie that, when closed, closes a list of other
|
||||||
|
// cookies.
|
||||||
|
func MultiCookie (cookies ...Cookie) Cookie {
|
||||||
|
return multiCookie(cookies)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cookies multiCookie) Close () {
|
||||||
|
for _, cookie := range cookies {
|
||||||
|
cookie.Close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue