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