Documentation ¶
Index ¶
Constants ¶
View Source
const UsernameRE = `(?:[a-zA-Z0-9]+_?)+`
UsernameRE is the regex for matching usernames. Underscores are allowed, just not first or doubled.
Variables ¶
This section is empty.
Functions ¶
func CheckUsername ¶
CheckUsername returns true if the given string can be a Keybase username.
Types ¶
type NormalizedUsername ¶
type NormalizedUsername string
NormalizedUsername is a Keybase username that has been normalized (toLowered) and therefore will compare correctly against other normalized usernames.
func NewNormalizedUsername ¶
func NewNormalizedUsername(s string) NormalizedUsername
NewNormalizedUsername makes a normalized username out of a non-normalized plain string username
func (NormalizedUsername) Eq ¶
func (n NormalizedUsername) Eq(n2 NormalizedUsername) bool
Eq returns true if the given normalized usernames are equal
func (NormalizedUsername) IsNil ¶
func (n NormalizedUsername) IsNil() bool
IsNil returns true if the username is the empty string
func (NormalizedUsername) IsValid ¶
func (n NormalizedUsername) IsValid() bool
IsValid returns CheckUsername(n.String()).
func (NormalizedUsername) String ¶
func (n NormalizedUsername) String() string
String returns the normalized username as a string (in lower case)
Click to show internal directories.
Click to hide internal directories.