mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
go fmt
This commit is contained in:
parent
49cc022ca2
commit
2b1844971c
@ -10,7 +10,6 @@ import (
|
|||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/broker"
|
||||||
"github.com/micro/go-micro/util/pool"
|
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/client/selector"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/codec"
|
||||||
raw "github.com/micro/go-micro/codec/bytes"
|
raw "github.com/micro/go-micro/codec/bytes"
|
||||||
@ -19,6 +18,7 @@ import (
|
|||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/registry"
|
||||||
"github.com/micro/go-micro/transport"
|
"github.com/micro/go-micro/transport"
|
||||||
"github.com/micro/go-micro/util/buf"
|
"github.com/micro/go-micro/util/buf"
|
||||||
|
"github.com/micro/go-micro/util/pool"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rpcClient struct {
|
type rpcClient struct {
|
||||||
|
@ -246,12 +246,12 @@ var (
|
|||||||
}
|
}
|
||||||
|
|
||||||
DefaultRuntimes = map[string]func(...runtime.Option) runtime.Runtime{
|
DefaultRuntimes = map[string]func(...runtime.Option) runtime.Runtime{
|
||||||
"local": runtime.NewRuntime,
|
"local": runtime.NewRuntime,
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultStores = map[string]func(...store.Option) store.Store{
|
DefaultStores = map[string]func(...store.Option) store.Store{
|
||||||
"memory": memStore.NewStore,
|
"memory": memStore.NewStore,
|
||||||
"service": svcStore.NewStore,
|
"service": svcStore.NewStore,
|
||||||
}
|
}
|
||||||
|
|
||||||
// used for default selection as the fall back
|
// used for default selection as the fall back
|
||||||
|
@ -36,6 +36,11 @@ type Span struct {
|
|||||||
|
|
||||||
type spanKey struct{}
|
type spanKey struct{}
|
||||||
|
|
||||||
|
var (
|
||||||
|
// Default tracer
|
||||||
|
DefaultTrace = NewTrace()
|
||||||
|
)
|
||||||
|
|
||||||
// FromContext returns a span from context
|
// FromContext returns a span from context
|
||||||
func FromContext(ctx context.Context) (*Span, bool) {
|
func FromContext(ctx context.Context) (*Span, bool) {
|
||||||
s, ok := ctx.Value(spanKey{}).(*Span)
|
s, ok := ctx.Value(spanKey{}).(*Span)
|
||||||
|
Loading…
Reference in New Issue
Block a user