mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			207 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			207 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package set
 | 
						|
 | 
						|
type Iterator[T any] struct {
 | 
						|
	vals []T
 | 
						|
	idx  int
 | 
						|
}
 | 
						|
 | 
						|
func (it *Iterator[T]) Value() T {
 | 
						|
	return it.vals[it.idx]
 | 
						|
}
 | 
						|
 | 
						|
func (it *Iterator[T]) Next() bool {
 | 
						|
	it.idx++
 | 
						|
	return it.idx < len(it.vals)
 | 
						|
}
 |