Registry / utility / bradfitz-iter

bradfitz-iter

JSON →
library0.0.0-20191230175014-e8f45d346db8gogounverified

A syntactically different way to iterate over integers, originally an educational joke.

go get github.com/bradfitz/iter
INSTALL
IMPORT
SIG · BRADFITZ-ITER
B
bradfitz-iter
utilitygov0.0.0-20191230175014-e8f45d346db8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

iter
github.com/bradfitz/iter

Iterate over integers 0 to 4.

package main import ( "fmt" "github.com/bradfitz/iter" ) func main() { for i := range iter.N(5) { fmt.Println(i) } }
Debug
Known issues
gotchaThis package is intentionally non-idiomatic and was created as a joke; consider using a standard for loop instead.
fix
Replace with `for i := 0; i < n; i++`
affects: all
Upgrade
Version history
0.0.0-20191230175014-e8f45d346db8latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
Meta
1
Amazon
1
Resources
bradfitz-iter — go get bradfitz-iter · libregistry