summaryrefslogtreecommitdiffstats
path: root/matterbridge.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-03-23 23:28:55 +0100
committerWim <wim@42.be>2017-03-23 23:28:55 +0100
commit2f68519b3c6b5a70028882c99afeb76f291b7725 (patch)
tree2555d0b8b81491f136a176a58e2618a25edc8edc /matterbridge.go
parentefe641f202653dfd3bc7bde221188e098db3def7 (diff)
downloadmatterbridge-msglm-2f68519b3c6b5a70028882c99afeb76f291b7725.tar.gz
matterbridge-msglm-2f68519b3c6b5a70028882c99afeb76f291b7725.tar.bz2
matterbridge-msglm-2f68519b3c6b5a70028882c99afeb76f291b7725.zip
Add gops agentv0.10.2-dev
Diffstat (limited to 'matterbridge.go')
-rw-r--r--matterbridge.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/matterbridge.go b/matterbridge.go
index 51184774..c9716d44 100644
--- a/matterbridge.go
+++ b/matterbridge.go
@@ -7,6 +7,7 @@ import (
"github.com/42wim/matterbridge/gateway"
"github.com/42wim/matterbridge/gateway/samechannel"
log "github.com/Sirupsen/logrus"
+ "github.com/google/gops/agent"
)
var (
@@ -22,7 +23,12 @@ func main() {
flagConfig := flag.String("conf", "matterbridge.toml", "config file")
flagDebug := flag.Bool("debug", false, "enable debug")
flagVersion := flag.Bool("version", false, "show version")
+ flagGops := flag.Bool("gops", false, "enable gops agent")
flag.Parse()
+ if *flagGops {
+ agent.Listen(&agent.Options{})
+ defer agent.Close()
+ }
if *flagVersion {
fmt.Printf("version: %s %s\n", version, githash)
return