Implement Containers in set

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: 43bcbf06a663c5d8cac63f2af8fefef7edc5513a
Component: engine
This commit is contained in:
Guillaume J. Charmes
2014-01-22 16:13:28 -08:00
parent 90791dd030
commit 89dcf8ee2f

View File

@ -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) {