goldgorilla/main.go

26 lines
723 B
Go
Raw Normal View History

package main
import (
"flag"
"strings"
)
func main() {
2023-08-14 10:25:09 +00:00
svcAddr := flag.String("svc-addr", "http://localhost:8080", "service baseurl to register in logjam ( shouldn't end with / )")
src := flag.String("src", "localhost:8080", "listenHost:listenPort")
2023-08-19 10:11:23 +00:00
logjamBaseUrl := flag.String("logjam-base-url", "http://localhost:443", "logjam base url(shouldn't end with /)")
2023-08-14 10:25:09 +00:00
targetRoom := flag.String("targetRoom", "test-room", "target room")
flag.Parse()
if strings.HasSuffix(*logjamBaseUrl, "/") {
panic("logjam-base-url shouldn't end with /")
}
if strings.HasSuffix(*svcAddr, "/") {
panic("service address shouldn't end with /")
}
app := App{}
app.Init(*src, *svcAddr, *logjamBaseUrl, *targetRoom)
app.Run()
}