1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

fix(code): remove code that is no longer necessary EE-6078 (#10256)

This commit is contained in:
andres-portainer 2023-09-05 22:35:16 -03:00 committed by GitHub
parent c748385879
commit 4a39122415
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 33 additions and 224 deletions

View file

@ -3,48 +3,3 @@ package exec
import "regexp"
var stackNameNormalizeRegex = regexp.MustCompile("[^-_a-z0-9]+")
type StringSet map[string]bool
func NewStringSet() StringSet {
return make(StringSet)
}
func (s StringSet) Add(x string) {
s[x] = true
}
func (s StringSet) Remove(x string) {
if s.Contains(x) {
delete(s, x)
}
}
func (s StringSet) Contains(x string) bool {
_, ok := s[x]
return ok
}
func (s StringSet) Len() int {
return len(s)
}
func (s StringSet) List() []string {
list := make([]string, s.Len())
i := 0
for k := range s {
list[i] = k
i++
}
return list
}
func (s StringSet) Union(x StringSet) {
if x.Len() != 0 {
for k := range x {
s.Add(k)
}
}
}