nicknames

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 2 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MinNicknameLength = 3
	MaxNicknameLength = 24
)

Variables

View Source
var ErrNicknameTooLong = errors.Errorf("nicknames must be %d "+
	"characters in length or less", MaxNicknameLength)
View Source
var ErrNicknameTooShort = errors.Errorf("nicknames must be at least "+
	"%d characters in length", MinNicknameLength)

Functions

func IsValid

func IsValid(nick string) error

IsValid checks if a nickname is valid.

Rules:

  • A nickname must not be longer than 24 characters.
  • A nickname must not be shorter than 1 character.
  • If a nickname is blank (empty string), then it will be treated by the system as no nickname.

TODO: Add character filtering.

Types

This section is empty.

Jump to

Keyboard shortcuts

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