Popularity
2.1
Stable
Activity
6.0
Stable
20
3
0

Programming language: Go
Tags: Utilities    

r alternatives and similar packages

Based on the "Utilities" category.
Alternatively, view r alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of r or a related project?

Add another 'Utilities' Package

README

r 🧻

GoDoc License GitHub Action Build Go Report Card Codacy Badge Maintainability Codecov

Improved Python-like range() experience for Go.

install

Download this package:

go get -u github.com/is5/r

usage

Import this package in your app:

import "github.com/is5/r"

example

Python normal style in Go import "github.com/is5/r"
range(10) for i := 0; i < 10; i++ {...} for i := range r.N(10) {...}
range(1, 11) for i := 1; i <= 10; i++ {...} for _, i := range r.R(1, 10) {...}
range(30, 19, -1) for i := 30; i >= 20; i-- {...} for _, i := range r.R(30, 20) {...}
range(10, 101, 5) for i := 10; i <= 100; i += 5 {...} for _, i := range r.S(10, 100, 5) {...}
range(300, 199, -10) for i := 300; i >= 200; i -= 10 {...} for _, i := range r.S(300, 200, 10) {...}


*Note that all licence references and agreements mentioned in the r README section above are relevant to that project's source code only.