close #9
This commit is contained in:
parent
75e2f95ff9
commit
193481a0ce
5
conf.go
5
conf.go
@ -133,8 +133,3 @@ func parseConf(filename string) *Conf {
|
||||
|
||||
return &conf
|
||||
}
|
||||
|
||||
func parseArgs() map[string]string {
|
||||
var args map[string]string
|
||||
return args
|
||||
}
|
||||
|
12
main.go
12
main.go
@ -2,8 +2,10 @@ package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
@ -89,7 +91,15 @@ func (s *Stream) handle() {
|
||||
}
|
||||
|
||||
func main() {
|
||||
conf := parseConf("./reaction.yml")
|
||||
confFilename := flag.String("c", "", "configuration file. see an example at https://framagit.org/ppom/reaction/-/blob/main/reaction.yml")
|
||||
flag.Parse()
|
||||
|
||||
if *confFilename == "" {
|
||||
flag.PrintDefaults()
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
conf := parseConf(*confFilename)
|
||||
|
||||
for _, stream := range conf.Streams {
|
||||
go stream.handle()
|
||||
|
Loading…
Reference in New Issue
Block a user