Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MaxLength is the maximum length of a slug. MaxLength int = 50 // NonAuthorizedChars is a regular expression that matches all non-authorized characters. // It is used to replace non-authorized characters with dashes. // For example, if you want to replace all non-authorized characters with dashes, you can use: // slug.NonAuthorizedChars = regexp.MustCompile("[^a-zA-Z0-9-_]") // You can use any regular expression you want. NonAuthorizedChars *regexp.Regexp = regexp.MustCompile("[^a-zA-Z0-9-_]") // MultipleDashes is a regular expression that matches multiple dashes. // It is used to replace multiple dashes with a single dash. // For example, if you want to replace multiple dashes with a single dash, you can use: // slug.MultipleDashes = regexp.MustCompile("-+") // You can use any regular expression you want. MultipleDashes *regexp.Regexp = regexp.MustCompile("-+") )
View Source
var ENSub = Sub{
'&': "and",
'@': "at",
}
View Source
var TRSub = Sub{
'&': "ve",
'@': "et",
'ş': "s",
'Ş': "S",
'ü': "u",
'Ü': "U",
'ö': "o",
'Ö': "O",
'İ': "I",
'ı': "i",
'ğ': "g",
'Ğ': "G",
'ç': "c",
'Ç': "C",
}
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.