mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-09 01:58:45 +00:00
feat(iplist2rule): add comment describing how rule was generated
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/TecharoHQ/anubis/lib/config"
|
||||
"github.com/facebookgo/flagenv"
|
||||
@@ -85,9 +86,10 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatalf("can't create output file %q: %v", foutName, err)
|
||||
}
|
||||
|
||||
defer fout.Close()
|
||||
|
||||
fmt.Fprintf(fout, "# Generated by %s on %s from %s\n\n", filepath.Base(os.Args[0]), time.Now().Format(time.RFC3339), blocklistURL)
|
||||
|
||||
data, err := yaml.Marshal([]*Rule{result})
|
||||
if err != nil {
|
||||
log.Fatalf("can't marshal yaml")
|
||||
|
||||
Reference in New Issue
Block a user