| 
									
										
										
										
											2025-03-10 14:52:50 -05:00
										 |  |  | package nomino | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type Config struct { | 
					
						
							|  |  |  | 	original  string | 
					
						
							|  |  |  | 	prefix    string | 
					
						
							|  |  |  | 	suffix    string | 
					
						
							|  |  |  | 	extension string | 
					
						
							| 
									
										
										
										
											2025-03-11 16:42:39 -05:00
										 |  |  | 	separator string | 
					
						
							| 
									
										
										
										
											2025-03-10 14:52:50 -05:00
										 |  |  | 	generator Generator | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func NewConfig(options ...Option) Config { | 
					
						
							|  |  |  | 	conf := Config{ | 
					
						
							|  |  |  | 		extension: ".txt", | 
					
						
							| 
									
										
										
										
											2025-03-11 16:42:39 -05:00
										 |  |  | 		separator: "_", | 
					
						
							| 
									
										
										
										
											2025-03-10 14:52:50 -05:00
										 |  |  | 		generator: uuidGen, | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	for _, opt := range options { | 
					
						
							|  |  |  | 		opt(&conf) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return conf | 
					
						
							|  |  |  | } |