✨ Add Slug Generator
This commit is contained in:
parent
921020d9fd
commit
1d235af876
8 changed files with 124 additions and 1 deletions
23
options_examples_test.go
Normal file
23
options_examples_test.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue