validation

package
v0.44.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEnvarName = errPackage.Code("invalid_envar_name").ErrorPref("environment variable names may not contain NUL or = characters and may only contain characters of the portable character set defined in IEEE Std 1003.1: %s")
)

Errors

Functions

func IsEnvarName

func IsEnvarName(name string) bool

IsEnvarName returns true when the given string is a valid environment variable name according to IEEE Std 1003.1-2017, i.e. containing only characters of the Portable character set, excluding the NUL and = characters.

func IsEnvarNamePosix

func IsEnvarNamePosix(name string) bool

IsEnvarNamePosix returns true when the given string is a POSIX compliant environment variable name, i.e. contains only letters, numbers and underscores, and does not start with a number.

func ValidateEnvarName

func ValidateEnvarName(name string) error

ValidateEnvarName validates an environment variable name using the default validation function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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