Add generate a dir and conf file in /etc/banforge

This commit is contained in:
d3m0k1d
2026-01-04 19:21:57 +03:00
parent 2ac31f49af
commit 3ace10d05a
2 changed files with 49 additions and 0 deletions

28
local/parser/parser.go Normal file
View File

@@ -0,0 +1,28 @@
package parser
import (
"bufio"
"github.com/d3m0k1d/BanForge/local/logger"
"os"
)
type Event struct {
Data string
}
type Scaner struct {
scanner *bufio.Scanner
ch chan Event
}
func CreateScaner(path string) *Scaner {
log := logger.New(false)
file, err := os.Open(path)
if err != nil {
log.Error(err.Error())
}
return &Scaner{
scanner: bufio.NewScanner(file),
ch: make(chan Event),
}
}