chore: reorgnalize function
This commit is contained in:
		
							parent
							
								
									c0bd1c1fcf
								
							
						
					
					
						commit
						43b8f374db
					
				|  | @ -10,15 +10,6 @@ import ( | ||||||
| 	"strings" | 	"strings" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func inString(str1 string, strList []string) bool { |  | ||||||
| 	for _, str := range strList { |  | ||||||
| 		if str1 == str { |  | ||||||
| 			return true |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 	return false |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // getForbiddens retrieves a list of forbidden files in the specified root directory.
 | // getForbiddens retrieves a list of forbidden files in the specified root directory.
 | ||||||
| // It searches for files that do not match the specified regex patterns in the given file list.
 | // It searches for files that do not match the specified regex patterns in the given file list.
 | ||||||
| func getForbiddens(root string, fileList []string, localList string) ([]string, error) { | func getForbiddens(root string, fileList []string, localList string) ([]string, error) { | ||||||
|  |  | ||||||
|  | @ -5,6 +5,15 @@ import ( | ||||||
| 	"regexp" | 	"regexp" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  | func inString(str1 string, strList []string) bool { | ||||||
|  | 	for _, str := range strList { | ||||||
|  | 		if str1 == str { | ||||||
|  | 			return true | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return false | ||||||
|  | } | ||||||
|  | 
 | ||||||
| // addExt appends the specified extension to each file name in the given fileList.
 | // addExt appends the specified extension to each file name in the given fileList.
 | ||||||
| // It modifies the original fileList in place.
 | // It modifies the original fileList in place.
 | ||||||
| func addExt(fileList []string, ext string) { | func addExt(fileList []string, ext string) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 zzjc1234
						zzjc1234