mirror of https://github.com/docker/docs.git
Implement Containers in set
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
This commit is contained in:
parent
63d18d875b
commit
43bcbf06a6
|
@ -45,6 +45,16 @@ func (s *iPSet) Pop() string {
|
||||||
return ""
|
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.
|
// Remove removes an element from the list.
|
||||||
// If the element is not found, it has no effect.
|
// If the element is not found, it has no effect.
|
||||||
func (s *iPSet) Remove(elem string) {
|
func (s *iPSet) Remove(elem string) {
|
||||||
|
|
Loading…
Reference in New Issue