Merge remote-tracking branch 'fork/stack_set' into move-networking
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
commit
b58c1a6438
1 changed files with 10 additions and 0 deletions
|
@ -45,6 +45,16 @@ func (s *iPSet) Pop() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
// Exists checks if the given element present in the list.
|
||||
func (s *iPSet) Exists(elem string) bool {
|
||||
for _, e := range s.set {
|
||||
if e == elem {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Remove removes an element from the list.
|
||||
// If the element is not found, it has no effect.
|
||||
func (s *iPSet) Remove(elem string) {
|
||||
|
|
Loading…
Add table
Reference in a new issue