<commit_before>package main

import (
	"flag"
	"log"
	"os"
	"os/signal"
)

var (
	listen  = flag.String("listen", ":8053", "set the listener address")
	flaglog = flag.Bool("log", false, "be more verbose")
	flagrun = flag.Bool("run", false, "run server")
)

func main() {

	log.SetPrefix("geodns ")
	log.SetFlags(log.Lmicroseconds | log.Lshortfile)

	flag.Usage = func() {
		flag.PrintDefaults()
	}
	flag.Parse()

	dirName := "dns"

	Zones := make(Zones)

	go configReader(dirName, Zones)
	go startServer(&Zones)

	if *flagrun {
		sig := make(chan os.Signal)
		signal.Notify(sig, os.Interrupt)

	forever:
		for {
			select {
			case <-sig:
				log.Printf("geodns: signal received, stopping")
				break forever
			}
		}
	}

}<commit_msg>Simplify 'wait until interrupt signal' code<commit_after>package main

import (
	"flag"
	"log"
	"os"
	"os/signal"
)

var (
	listen  = flag.String("listen", ":8053", "set the listener address")
	flaglog = flag.Bool("log", false, "be more verbose")
	flagrun = flag.Bool("run", false, "run server")
)

func main() {

	log.SetPrefix("geodns ")
	log.SetFlags(log.Lmicroseconds | log.Lshortfile)

	flag.Usage = func() {
		flag.PrintDefaults()
	}
	flag.Parse()

	dirName := "dns"

	Zones := make(Zones)

	go configReader(dirName, Zones)
	go startServer(&Zones)

	if *flagrun {
		sig := make(chan os.Signal)
		signal.Notify(sig, os.Interrupt)

		<-sig
		log.Printf("geodns: signal received, stopping")
		os.Exit(0)
	}

}
{'fraction_non_alphanumeric': 0.16240497581202487, 'fraction_numerical': 0.006219765031098825, 'mean_word_length': 3.859060402684564, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7499629', 'n_tokens_mistral': 606, 'n_tokens_neox': 555, 'n_words': 124}