Documentation ¶
Index ¶
Constants ¶
View Source
const UsernameMaxLen = 40
View Source
const UsernameMinLen = 3
Variables ¶
View Source
var ( ErrInvalidUsername = errors.New("Invalid username") ErrUnexpected = errors.New("unknown error") )
View Source
var (
ErrInvalidUsernameBase = errors.New("Invalid username base")
)
View Source
var UsernameBaseRegexp = fmt.Sprintf( `^(?:@)?[a-zA-Z0-9]{%d,%d}$`, UsernameMinLen, UsernameMaxLen)
View Source
var UsernameRegexp = fmt.Sprintf(`%s:[0-9]+$`, UsernameBaseRegexp)
Functions ¶
This section is empty.
Types ¶
type NilUsername ¶
type NilUsername struct{}
func (*NilUsername) Base ¶
func (nu *NilUsername) Base() string
func (*NilUsername) ID ¶
func (nu *NilUsername) ID() int
func (*NilUsername) IsNil ¶
func (nu *NilUsername) IsNil() bool
func (*NilUsername) String ¶
func (nu *NilUsername) String() string
func (*NilUsername) StringWithoutAt ¶
func (nu *NilUsername) StringWithoutAt() string
Click to show internal directories.
Click to hide internal directories.