Inform user
This commit is contained in:
		
							parent
							
								
									deb85fe10d
								
							
						
					
					
						commit
						3d0735ae7b
					
				
							
								
								
									
										6
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								main.go
									
									
									
									
									
								
							| @ -89,6 +89,9 @@ func process(ip net.IP, domains []string) { | |||||||
| 				lines[lPos] = fmt.Sprintf("%s %s", hostLine, newDomains) | 				lines[lPos] = fmt.Sprintf("%s %s", hostLine, newDomains) | ||||||
| 			} | 			} | ||||||
| 			found = true | 			found = true | ||||||
|  | 
 | ||||||
|  | 			// Inform user | ||||||
|  | 			fmt.Printf("Updated the line for '%s' to include '%s'", ipString, newDomains) | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| @ -98,6 +101,9 @@ func process(ip net.IP, domains []string) { | |||||||
| 		date := time.Now().Format("02-01-2006") | 		date := time.Now().Format("02-01-2006") | ||||||
| 		newLine := fmt.Sprintf("%s\t%s # Added by ghost on %s", ipString, newDomains, date) | 		newLine := fmt.Sprintf("%s\t%s # Added by ghost on %s", ipString, newDomains, date) | ||||||
| 		lines = append(lines, newLine) | 		lines = append(lines, newLine) | ||||||
|  | 
 | ||||||
|  | 		// Inform user | ||||||
|  | 		fmt.Printf("Appended line for '%s' to include '%s'", ipString, newDomains) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	// Write out again | 	// Write out again | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user