Help us shape the future of Go! Take the 2026 Go Developer Survey

ranges

package
v0.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2026 License: GPL-2.0 Imports: 2 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Range

type Range[N comparable] struct {
	Start N
	End   N
}

func Exclude

func Exclude[N constraints.Integer](ranges []Range[N], targetRanges []Range[N]) []Range[N]

func Merge

func Merge[N constraints.Integer](ranges []Range[N]) (mergedRanges []Range[N])

func New

func New[N constraints.Integer](start N, end N) Range[N]

func NewSingle

func NewSingle[N constraints.Integer](index N) Range[N]

func Revert

func Revert[N constraints.Integer](start, end N, ranges []Range[N]) (revertedRanges []Range[N])

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL