agdvalidate

package
v0.0.0-...-920466d Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package agdvalidate contains validation utilities.

Index

Constants

View Source
const (
	UnitByte = "bytes"
	UnitRune = "runes"
)

Unit name constants.

Variables

This section is empty.

Functions

func FirstNonIDRune

func FirstNonIDRune(s string, excludeSlashes bool) (i int, r rune)

FirstNonIDRune returns the first non-printable or non-ASCII rune and its index. If includeSlashes is true, it also looks for slashes. If there are no such runes, i is -1.

func Inclusion

func Inclusion(n, minVal, maxVal int, unitName string) (err error)

Inclusion returns an error if n is greater than maxVal or less than minVal. unitName is used for error messages, see UnitByte and the related constants.

Types

This section is empty.

Jump to

Keyboard shortcuts

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