 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Char ¶
Example ¶
package main
import (
	"fmt"
	"go.llib.dev/frameless/ports/iterators/ranges"
)
func main() {
	iter := ranges.Char('A', 'Z')
	defer iter.Close()
	for iter.Next() {
		// prints characters between A and Z
		// A, B, C, D... Z
		fmt.Println(string(iter.Value()))
	}
	if err := iter.Err(); err != nil {
		panic(err.Error())
	}
}
func Int ¶
Example ¶
package main
import (
	"fmt"
	"go.llib.dev/frameless/ports/iterators/ranges"
)
func main() {
	iter := ranges.Int(1, 9)
	defer iter.Close()
	for iter.Next() {
		// prints characters between 1 and 9
		// 1, 2, 3, 4, 5, 6, 7, 8, 9
		fmt.Println(iter.Value())
	}
	if err := iter.Err(); err != nil {
		panic(err.Error())
	}
}
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.