overwrite output file, do not append to it
This commit is contained in:
		
							
								
								
									
										2
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.go
									
									
									
									
									
								
							@@ -64,7 +64,7 @@ func main() {
 | 
			
		||||
		return outRows[i].NumberQueries < outRows[j].NumberQueries
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	f, err := os.OpenFile(*outFile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600)
 | 
			
		||||
	f, err := os.OpenFile(*outFile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Fatalf("failed to open output file '%s': %v", *outFile, err)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user