Documentation ¶
Index ¶
Constants ¶
View Source
const ( RT_PATH_VAR_PREFIX = "<<" RT_PATH_VAR_SUFFIX = ">>" RT_PATH_VAR_DELIM = ":" )
Router regex delimiters
View Source
const ( NameInt = "int" NameString = "string" NameSlug = "slug" NameUUID = "uuid" NameAny = "any" NameHex = "hex" NameAlphaNum = "alphanum" )
Router regex types.
View Source
const ( // Match any character RT_PATH_REGEX_ANY = ".+" // Match any number RT_PATH_REGEX_NUM = "[0-9]+" // Match any string RT_PATH_REGEX_STR = "[a-zA-Z]+" // Match any hex number RT_PATH_REGEX_HEX = "[0-9a-fA-F]+" // Match any UUID RT_PATH_REGEX_UUID = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" // Match any alphanumeric string RT_PATH_REGEX_ALPHANUMERIC = "[0-9a-zA-Z_-]+" // Match any slug RT_PATH_REGEX_SLUG = "[0-9a-zA-Z_-]+" )
Router regex patterns
Variables ¶
This section is empty.
Functions ¶
Types ¶
type URLFormatter ¶ added in v1.0.6
type URLFormatter string
func (URLFormatter) Format ¶ added in v1.0.6
func (uf URLFormatter) Format(v ...any) string
Format the URL with the given arguments.
func (URLFormatter) FormatSafe ¶ added in v1.0.8
func (uf URLFormatter) FormatSafe(v ...any) (string, error)
Format the URL with the given arguments.
Click to show internal directories.
Click to hide internal directories.