This commit is contained in:
Asim Aslam 2020-01-29 22:40:43 +00:00
parent 1be8258721
commit 49b86c56e3
8 changed files with 12 additions and 8 deletions

View File

@ -8,8 +8,8 @@ import (
"strings" "strings"
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
"github.com/micro/go-micro/agent/input"
"github.com/micro/cli/v2" "github.com/micro/cli/v2"
"github.com/micro/go-micro/agent/input"
) )
func init() { func init() {

View File

@ -4,9 +4,9 @@ import (
"errors" "errors"
"sync" "sync"
"github.com/micro/cli/v2"
"github.com/micro/go-micro/agent/input" "github.com/micro/go-micro/agent/input"
"github.com/nlopes/slack" "github.com/nlopes/slack"
"github.com/micro/cli/v2"
) )
type slackInput struct { type slackInput struct {

View File

@ -5,8 +5,8 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/micro/go-micro/agent/input"
"github.com/micro/cli/v2" "github.com/micro/cli/v2"
"github.com/micro/go-micro/agent/input"
tgbotapi "gopkg.in/telegram-bot-api.v4" tgbotapi "gopkg.in/telegram-bot-api.v4"
) )

View File

@ -8,9 +8,9 @@ import (
"time" "time"
"github.com/imdario/mergo" "github.com/imdario/mergo"
"github.com/micro/cli/v2"
"github.com/micro/go-micro/config/cmd" "github.com/micro/go-micro/config/cmd"
"github.com/micro/go-micro/config/source" "github.com/micro/go-micro/config/source"
"github.com/micro/cli/v2"
) )
type cliSource struct { type cliSource struct {

View File

@ -5,9 +5,9 @@ import (
"os" "os"
"testing" "testing"
"github.com/micro/cli/v2"
"github.com/micro/go-micro/config/cmd" "github.com/micro/go-micro/config/cmd"
"github.com/micro/go-micro/config/source" "github.com/micro/go-micro/config/source"
"github.com/micro/cli/v2"
) )
func test(t *testing.T, withContext bool) { func test(t *testing.T, withContext bool) {

View File

@ -13,11 +13,11 @@ import (
) )
// NewHandler returns an instance of the Debug Handler // NewHandler returns an instance of the Debug Handler
func NewHandler(srv server.Server) *Debug { func NewHandler() *Debug {
return &Debug{ return &Debug{
log: log.DefaultLog, log: log.DefaultLog,
stats: stats.DefaultStats, stats: stats.DefaultStats,
trace: srv.Options().Tracer, trace: trace.DefaultTracer,
} }
} }

View File

@ -2,11 +2,13 @@ package micro
import ( import (
"github.com/micro/go-micro/client" "github.com/micro/go-micro/client"
"github.com/micro/go-micro/debug/trace"
"github.com/micro/go-micro/server" "github.com/micro/go-micro/server"
"github.com/micro/go-micro/store" "github.com/micro/go-micro/store"
// set defaults // set defaults
gcli "github.com/micro/go-micro/client/grpc" gcli "github.com/micro/go-micro/client/grpc"
memTrace "github.com/micro/go-micro/debug/trace/memory"
gsrv "github.com/micro/go-micro/server/grpc" gsrv "github.com/micro/go-micro/server/grpc"
memStore "github.com/micro/go-micro/store/memory" memStore "github.com/micro/go-micro/store/memory"
) )
@ -18,4 +20,6 @@ func init() {
server.DefaultServer = gsrv.NewServer() server.DefaultServer = gsrv.NewServer()
// default store // default store
store.DefaultStore = memStore.NewStore() store.DefaultStore = memStore.NewStore()
// set default trace
trace.DefaultTracer = memTrace.NewTracer()
} }

View File

@ -14,6 +14,7 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/micro/cli/v2"
"github.com/micro/go-micro" "github.com/micro/go-micro"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
maddr "github.com/micro/go-micro/util/addr" maddr "github.com/micro/go-micro/util/addr"
@ -21,7 +22,6 @@ import (
"github.com/micro/go-micro/util/log" "github.com/micro/go-micro/util/log"
mnet "github.com/micro/go-micro/util/net" mnet "github.com/micro/go-micro/util/net"
mls "github.com/micro/go-micro/util/tls" mls "github.com/micro/go-micro/util/tls"
"github.com/micro/cli/v2"
) )
type service struct { type service struct {