37 lines
		
	
	
	
		
			669 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			37 lines
		
	
	
	
		
			669 B
		
	
	
	
		
			Go
		
	
	
	
	
	
|  | package nomino_test | ||
|  | 
 | ||
|  | import ( | ||
|  | 	"fmt" | ||
|  | 
 | ||
|  | 	"codeberg.org/danjones000/nomino" | ||
|  | ) | ||
|  | 
 | ||
|  | func ExampleUUID() { | ||
|  | 	option := nomino.WithGenerator(nomino.UUID()) | ||
|  | 
 | ||
|  | 	str, _ := nomino.Make(nomino.NewConfig(option)) | ||
|  | 	fmt.Println(str) | ||
|  | 
 | ||
|  | 	str, _ = nomino.Make(nomino.NewConfig(option)) | ||
|  | 	fmt.Println(str) | ||
|  | 
 | ||
|  | 	str, _ = nomino.Make(nomino.NewConfig(option)) | ||
|  | 	fmt.Println(str) | ||
|  | } | ||
|  | 
 | ||
|  | func ExampleRandom() { | ||
|  | 	option := nomino.WithGenerator(nomino.Random()) | ||
|  | 
 | ||
|  | 	str, _ := nomino.Make(nomino.NewConfig(option)) | ||
|  | 	fmt.Println(str) | ||
|  | } | ||
|  | 
 | ||
|  | func ExampleRandomLength() { | ||
|  | 	option := nomino.WithGenerator(nomino.Random( | ||
|  | 		nomino.RandomLength(32), | ||
|  | 	)) | ||
|  | 
 | ||
|  | 	str, _ := nomino.Make(nomino.NewConfig(option)) | ||
|  | 	fmt.Println(str) | ||
|  | } |