types

package
v1.4.10 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelSeparator = "."
)
View Source
const (
	// An file is a string which starts with a letter or number and is followed by
	// letters, numbers, underscores or hyphens and punkts. If needs to be at least
	// 2 characters long. If cannot end with a punkt, underscore or hyphen.
	ReFilename = `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*[a-zA-Z0-9]`
)
View Source
const (
	// An identifier is a string which starts with a letter and is followed by
	// letters, numbers, underscores or hyphens. It must be between 1 and 32 characters
	ReIdentifier = `[a-zA-Z][a-zA-Z0-9_\-]{0,31}`
)

Variables

This section is empty.

Functions

func IsFilename added in v1.4.2

func IsFilename(s string) bool

Return true if the string is a valid filename

func IsIdentifier

func IsIdentifier(s string) bool

Return true if the string is a valid identifier

Types

type Label added in v1.4.9

type Label string

func NewLabel added in v1.4.9

func NewLabel(prefix string, parts ...string) Label

NewLabel returns a new label which is a concatenation of the prefix and parts, separated by a period. Returns an empty string if the prefix or any of the parts are not valid identifiers

Jump to

Keyboard shortcuts

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