Преглед на файлове

Do not provide the output file as an argument

Signed-off-by: Antoine Tenart <antoine.tenart@ack.tf>
Antoine Tenart преди 6 години
родител
ревизия
dd023ec4b6
променени са 2 файла, в които са добавени 3 реда и са изтрити 7 реда
  1. 2 1
      .gitignore
  2. 1 6
      main.go

+ 2 - 1
.gitignore

@@ -1 +1,2 @@
-blacklist-zone
+blacklist
+blacklist.txt

+ 1 - 6
main.go

@@ -27,15 +27,10 @@ var (
 		"ip6-mcastprefix", "ip6-allnodes", "ip6-allrouters",
 		"ip6-allhosts",
 	}
+	zone_file = "blacklist.txt"
 )
 
 func main() {
-	if len(os.Args) < 2 {
-		log.Fatal("Please provide a zone file to write to.")
-	}
-
-	zone_file := os.Args[1]
-
 	// Open the zone file, and create it if needed
 	f, err := os.OpenFile(zone_file, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
 	if err != nil {