Skip to content

schwarmco/go-expanding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-expanding

Build Status GoDoc

a package for working with ranges in golang

Installation

In order to start, go get this repository:

go get github.com/schwarmco/go-expanding

Usage

import (
    "fmt"
    "github.com/schwarmco/go-expanding"
)

func main() {

	a := expanding.Integer{
		Min:  0,
		Max:  10,
		Step: 2,
	}

	fmt.Println(a.Expand())

	a.Step = 3

	fmt.Println(a.Expand())

	// Output:
	// [0 2 4 6 8 10]
	// [0 3 6 9]
}

About

working with ranges in go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages