utils

package
v0.0.0-...-bc1935d Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must[T any](t T, e error) T

Types

type Range

type Range struct {
	Start, End int
}

func (Range) Contains

func (r Range) Contains(i int) bool

func (Range) Difference

func (r Range) Difference(other Range) RangeSet

func (Range) Intersect

func (r Range) Intersect(other Range) Range

func (Range) Len

func (r Range) Len() int

func (Range) Union

func (r Range) Union(other Range) RangeSet

type RangeSet

type RangeSet []Range

func (RangeSet) Difference

func (rs RangeSet) Difference(other RangeSet) RangeSet

func (RangeSet) Intersect

func (rs RangeSet) Intersect(other RangeSet) RangeSet

func (RangeSet) Len

func (rs RangeSet) Len() int

func (RangeSet) Union

func (rs RangeSet) Union(other RangeSet) RangeSet

type Tuple

type Tuple[T1, T2 any] struct {
	Item1 T1
	Item2 T2
}

type Tuple3

type Tuple3[T1, T2, T3 any] struct {
	Item1 T1
	Item2 T2
	Item3 T3
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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