Initial commit

This commit is contained in:
Manuel 2023-08-29 18:00:00 +02:00
commit eca46fcadd
Signed by: Manuel
GPG key ID: 4085037435E1F07A
21 changed files with 1666 additions and 0 deletions

28
cmd/config.go Normal file
View file

@ -0,0 +1,28 @@
package cmd
import (
"github.com/BurntSushi/toml"
"os"
)
type Config struct {
Username string
Password string
ProxyAddr string
Channels []string
Filter []uint8
Webhook string
DbPath string
CookiePath string
}
func ConfigFromFile(filePath string) (conf *Config, err error) {
tomlData, err := os.ReadFile(filePath)
if err != nil {
return nil, err
}
_, err = toml.Decode(string(tomlData), &conf)
return
}