checks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package checks contains routines for processing check numbers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Range

type Range struct {

	// First check number of range inclusive
	First int

	// Last check number of range inclusive
	Last int
}

Range represents a range of contiguous check numbers

type RangeWithHoles

type RangeWithHoles struct {

	// The first check number inclusive
	First int

	// The last check number inclusive
	Last int

	// The missing checks in between the first and last check number.
	Holes []Range
}

RangeWithHoles is used to report missing checks.

func Missing

func Missing(checkNos []int) *RangeWithHoles

Missing takes a sequence of check numbers and reports missing checks. Duplicate check numbers in checkNos are treated as if the check number appeared once. If checkNos is empty, Missing returns nil.

Jump to

Keyboard shortcuts

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