From c42a4db10bd7dfd58e4db5a1e819f3606d211ab1 Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Tue, 23 Oct 2018 19:34:47 +0800 Subject: [PATCH] Moved Google Translate client to Router. --- bridge/config/config.go | 2 -- gateway/router.go | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bridge/config/config.go b/bridge/config/config.go index 944a1833..951b34ed 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -11,7 +11,6 @@ import ( prefixed "github.com/matterbridge/logrus-prefixed-formatter" log "github.com/sirupsen/logrus" "github.com/spf13/viper" - "cloud.google.com/go/translate" ) const ( @@ -172,7 +171,6 @@ type ConfigValues struct { Zulip map[string]Protocol General Protocol Gateway []Gateway - GTClient *translate.Client SameChannelGateway []SameChannelGateway } diff --git a/gateway/router.go b/gateway/router.go index 5b3d3de8..a80073aa 100644 --- a/gateway/router.go +++ b/gateway/router.go @@ -19,6 +19,7 @@ import ( type Router struct { Gateways map[string]*Gateway Message chan config.Message + GTClient *translate.Client *config.Config }