feat: repo health check (#16) #17
|  | @ -50,13 +50,15 @@ func VerifyFiles(rootDir string,checkFileNameList string, checkFileSumList strin | |||
| 	// rootDir := flag.String("rootDir", ".", "Root directory containing the files.")
 | ||||
| 	// flag.Parse()
 | ||||
| 	// Process input file names and checksums
 | ||||
| 	if len(checkFileNameList) == 0 { | ||||
| 		return nil//fmt.Errorf("No checksum happened")
 | ||||
| 		os.Exit(1) | ||||
| 
					
					bomingzh marked this conversation as resolved
					
						
						
							Outdated
						
					
				 | ||||
| 	} | ||||
| 	fileNames := strings.Split(checkFileNameList, ",") | ||||
| 	checkSums := strings.Split(checkFileSumList, ",") | ||||
| 
 | ||||
| 	// Check if the number of files matches the number of checksums
 | ||||
| 	if len(fileNames) == 0 { | ||||
| 		return nil//fmt.Errorf("No checksum happened")
 | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 	if len(fileNames) != len(checkSums) { | ||||
| 		return fmt.Errorf("Error: The number of files and checksums do not match.") | ||||
| 
				
					
						张泊明518370910136
						commented  remove it remove it 
				
					
						张泊明518370910136
						commented  I mean remove the  I mean remove the `os.Exit(1)`, and also the one on line 55. | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
remove it