<commit_before>package go2ban

import (
	"fmt"
	"os"
	"os/signal"
	"syscall"
)

func TrapSignals() {
	go func() {
		sigchan := make(chan os.Signal, 1)
		signal.Notify(sigchan, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGUSR1)

		for sig := range sigchan {
			switch sig {
			case syscall.SIGTERM, syscall.SIGINT:
				fmt.Println("[INFO] SIGTERM or SIGINT: Terminating process")
				os.Exit(0)

			case syscall.SIGQUIT:
				fmt.Println("[INFO] SIGQUIT: Shutting down")
				os.Exit(1)

			case syscall.SIGHUP:
				fmt.Println("[INFO] SIGHUP: Hanging up")

			case syscall.SIGUSR1:
				Srv.DumpCells()
				fmt.Println("[INFO] SIGUSR1:")

			}
		}
	}()
}<commit_msg>go2ban: removed fmt from sigtrap (not needed prints to console)<commit_after>package go2ban

import (
	"os"
	"os/signal"
	"syscall"
)

func TrapSignals() {
	go func() {
		sigchan := make(chan os.Signal, 1)
		signal.Notify(sigchan, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGUSR1)

		for sig := range sigchan {
			switch sig {
			case syscall.SIGTERM, syscall.SIGINT:
				os.Exit(0)
			case syscall.SIGQUIT:
				os.Exit(1)
			case syscall.SIGHUP:
			case syscall.SIGUSR1:
				Srv.DumpCells()
			}
		}
	}()
}
{'fraction_non_alphanumeric': 0.1368421052631579, 'fraction_numerical': 0.011336032388663968, 'mean_word_length': 3.510948905109489, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5138948', 'n_tokens_mistral': 600, 'n_tokens_neox': 483, 'n_words': 102}