Documentation ¶
Overview ¶
Package slugify is a Turkish/unicode compatible Slug generator library for golang.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Slugify ¶
Slugify converts given string into unicode compatible slug with standart Turkish configuration
Example ¶
slugified, _ := Slugify("Şok! Silivri ve Sason ilçe jandarma komutanları 'FETÖ'den tutuklandı") fmt.Println(slugified)
Output: sok-silivri-ve-sason-ilce-jandarma-komutanlari-fetoden-tutuklandi
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API structs creates a wrapper to be used for custom configurations
func GetWithCustomReplacer ¶
GetWithCustomReplacer returns API instance with given configuration
Example ¶
slugified, _ := GetWithCustomReplacer([]string{ " ", "-", "'", "", "ı", "i", ",", "", ".", "", }).Slugify("5 simple tips and tricks for writing unit tests in #golang") fmt.Println(slugified)
Output: 5-simple-tips-and-tricks-for-writing-unit-tests-in-#golang
func (*API) SetReplaceSet ¶
SetReplaceSet changes default replace table with given table.
Click to show internal directories.
Click to hide internal directories.