🚚 Move remaining examples to nomino_test
This commit is contained in:
parent
1d0f2238b3
commit
bd448eb5db
3 changed files with 33 additions and 18 deletions
|
|
@ -1,17 +1,24 @@
|
|||
package nomino
|
||||
package nomino_test
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
func ExampleWithGenerator_custom_generator() {
|
||||
gen := func(*Config) (string, error) {
|
||||
"codeberg.org/danjones000/nomino"
|
||||
)
|
||||
|
||||
func ExampleWithGenerator_customGenerator() {
|
||||
gen := func(*nomino.Config) (string, error) {
|
||||
return "hello", nil
|
||||
}
|
||||
option := WithGenerator(gen)
|
||||
option := nomino.WithGenerator(gen)
|
||||
|
||||
str, _ := Make(NewConfig(option))
|
||||
str, _ := nomino.Make(nomino.NewConfig(option))
|
||||
fmt.Println(str)
|
||||
|
||||
str, _ = Make(NewConfig(option, WithoutExtension()))
|
||||
str, _ = nomino.Make(nomino.NewConfig(
|
||||
option,
|
||||
nomino.WithoutExtension(),
|
||||
))
|
||||
fmt.Println(str)
|
||||
|
||||
// Output:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue