24 lines
410 B
Go
24 lines
410 B
Go
|
|
package nomino
|
||
|
|
|
||
|
|
import "fmt"
|
||
|
|
|
||
|
|
func ExampleWithOriginalSlug() {
|
||
|
|
st, _ := Make(NewConfig(
|
||
|
|
WithOriginalSlug("Hello, World"),
|
||
|
|
WithGenerator(Incremental()),
|
||
|
|
))
|
||
|
|
|
||
|
|
fmt.Println(st)
|
||
|
|
// Output: 0_hello-world.txt
|
||
|
|
}
|
||
|
|
|
||
|
|
func ExampleWithOriginalSlugLang() {
|
||
|
|
st, _ := Make(NewConfig(
|
||
|
|
WithOriginalSlugLang("Diese & Dass", "de"),
|
||
|
|
WithGenerator(Incremental()),
|
||
|
|
))
|
||
|
|
|
||
|
|
fmt.Println(st)
|
||
|
|
// Output: 0_diese-und-dass.txt
|
||
|
|
}
|