2022-07-22 19:52:41 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2022-07-23 00:33:05 +02:00
|
|
|
"log"
|
2022-07-22 19:52:41 +02:00
|
|
|
|
2022-07-23 00:33:05 +02:00
|
|
|
"git.luj0ga.de/franconian/matrix-pretix/internal/config"
|
2022-07-22 19:52:41 +02:00
|
|
|
"git.luj0ga.de/franconian/matrix-pretix/internal/matrix"
|
|
|
|
)
|
|
|
|
|
2022-07-23 00:33:05 +02:00
|
|
|
func main() {
|
|
|
|
if len(os.Args) != 2 {
|
|
|
|
log.Fatal("missing config file path")
|
2022-07-22 19:52:41 +02:00
|
|
|
}
|
|
|
|
|
2022-07-23 00:33:05 +02:00
|
|
|
config, err := config.ParseFromFile(os.Args[1])
|
2022-07-22 19:52:41 +02:00
|
|
|
if err != nil {
|
2022-07-23 00:33:05 +02:00
|
|
|
log.Fatal(err)
|
2022-07-22 19:52:41 +02:00
|
|
|
}
|
|
|
|
|
2022-07-23 00:33:05 +02:00
|
|
|
client, err := matrix.NewClient(&config.Matrix)
|
2022-07-22 19:52:41 +02:00
|
|
|
if err != nil {
|
2022-07-23 00:33:05 +02:00
|
|
|
log.Fatal(err)
|
2022-07-22 19:52:41 +02:00
|
|
|
}
|
|
|
|
}
|