mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Support UnsortedList() in auto-generated sets.
This commit is contained in:
		@@ -337,6 +337,15 @@ func (s $.type|public$) List() []$.type|raw$ {
 | 
			
		||||
	return []$.type|raw$(res)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UnsortedList returns the slice with contents in random order.
 | 
			
		||||
func (s $.type|public$) UnsortedList() []$.type|raw$ {
 | 
			
		||||
	res :=make([]$.type|raw$, 0, len(s))
 | 
			
		||||
	for key := range s {
 | 
			
		||||
		res = append(res, key)
 | 
			
		||||
	}
 | 
			
		||||
	return res
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Returns a single element from the set.
 | 
			
		||||
func (s $.type|public$) PopAny() ($.type|raw$, bool) {
 | 
			
		||||
	for key := range s {
 | 
			
		||||
 
 | 
			
		||||
@@ -174,6 +174,15 @@ func (s Byte) List() []byte {
 | 
			
		||||
	return []byte(res)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UnsortedList returns the slice with contents in random order.
 | 
			
		||||
func (s Byte) UnsortedList() []byte {
 | 
			
		||||
	res := make([]byte, 0, len(s))
 | 
			
		||||
	for key := range s {
 | 
			
		||||
		res = append(res, key)
 | 
			
		||||
	}
 | 
			
		||||
	return res
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Returns a single element from the set.
 | 
			
		||||
func (s Byte) PopAny() (byte, bool) {
 | 
			
		||||
	for key := range s {
 | 
			
		||||
 
 | 
			
		||||
@@ -174,6 +174,15 @@ func (s Int) List() []int {
 | 
			
		||||
	return []int(res)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UnsortedList returns the slice with contents in random order.
 | 
			
		||||
func (s Int) UnsortedList() []int {
 | 
			
		||||
	res := make([]int, 0, len(s))
 | 
			
		||||
	for key := range s {
 | 
			
		||||
		res = append(res, key)
 | 
			
		||||
	}
 | 
			
		||||
	return res
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Returns a single element from the set.
 | 
			
		||||
func (s Int) PopAny() (int, bool) {
 | 
			
		||||
	for key := range s {
 | 
			
		||||
 
 | 
			
		||||
@@ -174,6 +174,15 @@ func (s Int64) List() []int64 {
 | 
			
		||||
	return []int64(res)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UnsortedList returns the slice with contents in random order.
 | 
			
		||||
func (s Int64) UnsortedList() []int64 {
 | 
			
		||||
	res := make([]int64, 0, len(s))
 | 
			
		||||
	for key := range s {
 | 
			
		||||
		res = append(res, key)
 | 
			
		||||
	}
 | 
			
		||||
	return res
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Returns a single element from the set.
 | 
			
		||||
func (s Int64) PopAny() (int64, bool) {
 | 
			
		||||
	for key := range s {
 | 
			
		||||
 
 | 
			
		||||
@@ -174,6 +174,15 @@ func (s String) List() []string {
 | 
			
		||||
	return []string(res)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UnsortedList returns the slice with contents in random order.
 | 
			
		||||
func (s String) UnsortedList() []string {
 | 
			
		||||
	res := make([]string, 0, len(s))
 | 
			
		||||
	for key := range s {
 | 
			
		||||
		res = append(res, key)
 | 
			
		||||
	}
 | 
			
		||||
	return res
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Returns a single element from the set.
 | 
			
		||||
func (s String) PopAny() (string, bool) {
 | 
			
		||||
	for key := range s {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user