1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-07 23:02:12 +02:00

rename Kratos to kratos

This commit is contained in:
felixhao 2019-04-11 15:15:11 +08:00
parent fb57e4f197
commit 5d08a06525
32 changed files with 75 additions and 73 deletions

4
go.mod
View File

@ -1,4 +1,4 @@
module github.com/bilibili/Kratos
module github.com/bilibili/kratos
require (
github.com/BurntSushi/toml v0.3.1
@ -19,3 +19,5 @@ require (
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/go-playground/validator.v9 v9.26.0
)
go 1.12

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
xtime "github.com/bilibili/Kratos/pkg/time"
xtime "github.com/bilibili/kratos/pkg/time"
)
type config struct {

View File

@ -3,8 +3,8 @@ package dsn_test
import (
"log"
"github.com/bilibili/Kratos/pkg/conf/dsn"
xtime "github.com/bilibili/Kratos/pkg/time"
"github.com/bilibili/kratos/pkg/conf/dsn"
xtime "github.com/bilibili/kratos/pkg/time"
)
// Config struct

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
xtime "github.com/bilibili/Kratos/pkg/time"
xtime "github.com/bilibili/kratos/pkg/time"
)
type cfg1 struct {
@ -66,7 +66,7 @@ func TestDecodeQuery(t *testing.T) {
},
},
{
name: "test github.com/bilibili/Kratos/pkg/time",
name: "test github.com/bilibili/kratos/pkg/time",
args: args{
query: url.Values{
"timeout": {"1s"},
@ -77,7 +77,7 @@ func TestDecodeQuery(t *testing.T) {
cfg: &cfg2{xtime.Duration(time.Second)},
},
{
name: "test empty github.com/bilibili/Kratos/pkg/time",
name: "test empty github.com/bilibili/kratos/pkg/time",
args: args{
query: url.Values{},
v: &cfg2{},
@ -86,7 +86,7 @@ func TestDecodeQuery(t *testing.T) {
cfg: &cfg2{},
},
{
name: "test github.com/bilibili/Kratos/pkg/time",
name: "test github.com/bilibili/kratos/pkg/time",
args: args{
query: url.Values{},
v: &cfg4{},

View File

@ -4,7 +4,7 @@ import (
"context"
"flag"
"github.com/bilibili/Kratos/pkg/log"
"github.com/bilibili/kratos/pkg/log"
)
var (

View File

@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/bilibili/Kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/BurntSushi/toml"
)

View File

@ -3,7 +3,7 @@ package paladin_test
import (
"testing"
"github.com/bilibili/Kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/BurntSushi/toml"
"github.com/stretchr/testify/assert"

View File

@ -3,7 +3,7 @@ package paladin_test
import (
"testing"
"github.com/bilibili/Kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/stretchr/testify/assert"
)

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
xtime "github.com/bilibili/Kratos/pkg/time"
xtime "github.com/bilibili/kratos/pkg/time"
"github.com/stretchr/testify/assert"
)

View File

@ -6,7 +6,7 @@ import (
"io"
"time"
xtime "github.com/bilibili/Kratos/pkg/time"
xtime "github.com/bilibili/kratos/pkg/time"
)
var (

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
xtime "github.com/bilibili/Kratos/pkg/time"
xtime "github.com/bilibili/kratos/pkg/time"
"github.com/stretchr/testify/assert"
)

View File

@ -6,7 +6,7 @@ import (
"sync"
"time"
"github.com/bilibili/Kratos/pkg/ecode"
"github.com/bilibili/kratos/pkg/ecode"
)
// Config codel config.

View File

@ -8,7 +8,7 @@ import (
"testing"
"time"
"github.com/bilibili/Kratos/pkg/ecode"
"github.com/bilibili/kratos/pkg/ecode"
)
var testConf = &Config{

View File

@ -4,7 +4,7 @@ import (
"math"
"time"
"github.com/bilibili/Kratos/pkg/log/internal/core"
"github.com/bilibili/kratos/pkg/log/internal/core"
)
// D represents a map of entry level data used for structured logging.

View File

@ -6,7 +6,7 @@ import (
"path/filepath"
"time"
"github.com/bilibili/Kratos/pkg/log/internal/filewriter"
"github.com/bilibili/kratos/pkg/log/internal/filewriter"
)
// level idx

View File

@ -5,7 +5,7 @@ import (
"math"
"time"
xtime "github.com/bilibili/Kratos/pkg/time"
xtime "github.com/bilibili/kratos/pkg/time"
)
// FieldType represent D value type

View File

@ -8,7 +8,7 @@ import (
"strconv"
"strings"
"github.com/bilibili/Kratos/pkg/conf/env"
"github.com/bilibili/kratos/pkg/conf/env"
)
// Config log config.

View File

@ -4,7 +4,7 @@ import (
"context"
"testing"
"github.com/bilibili/Kratos/pkg/net/metadata"
"github.com/bilibili/kratos/pkg/net/metadata"
"github.com/stretchr/testify/assert"
)

View File

@ -6,9 +6,9 @@ import (
"runtime"
"strconv"
"github.com/bilibili/Kratos/pkg/conf/env"
"github.com/bilibili/Kratos/pkg/net/metadata"
"github.com/bilibili/Kratos/pkg/net/trace"
"github.com/bilibili/kratos/pkg/conf/env"
"github.com/bilibili/kratos/pkg/net/metadata"
"github.com/bilibili/kratos/pkg/net/trace"
)
func addExtraField(ctx context.Context, fields map[string]interface{}) {

View File

@ -14,15 +14,15 @@ import (
"sync/atomic"
"time"
"github.com/bilibili/Kratos/pkg/conf/env"
"github.com/bilibili/Kratos/pkg/ecode"
"github.com/bilibili/Kratos/pkg/log"
"github.com/bilibili/Kratos/pkg/naming"
bm "github.com/bilibili/Kratos/pkg/net/http/blademaster"
"github.com/bilibili/Kratos/pkg/net/netutil"
"github.com/bilibili/Kratos/pkg/net/netutil/breaker"
xstr "github.com/bilibili/Kratos/pkg/str"
xtime "github.com/bilibili/Kratos/pkg/time"
"github.com/bilibili/kratos/pkg/conf/env"
"github.com/bilibili/kratos/pkg/ecode"
"github.com/bilibili/kratos/pkg/log"
"github.com/bilibili/kratos/pkg/naming"
bm "github.com/bilibili/kratos/pkg/net/http/blademaster"
"github.com/bilibili/kratos/pkg/net/netutil"
"github.com/bilibili/kratos/pkg/net/netutil/breaker"
xstr "github.com/bilibili/kratos/pkg/str"
xtime "github.com/bilibili/kratos/pkg/time"
)
const (

View File

@ -17,11 +17,11 @@ import (
"sync"
"time"
"github.com/bilibili/Kratos/pkg/conf/env"
"github.com/bilibili/Kratos/pkg/net/metadata"
"github.com/bilibili/Kratos/pkg/net/netutil/breaker"
"github.com/bilibili/Kratos/pkg/stat"
xtime "github.com/bilibili/Kratos/pkg/time"
"github.com/bilibili/kratos/pkg/conf/env"
"github.com/bilibili/kratos/pkg/net/metadata"
"github.com/bilibili/kratos/pkg/net/netutil/breaker"
"github.com/bilibili/kratos/pkg/stat"
xtime "github.com/bilibili/kratos/pkg/time"
"github.com/gogo/protobuf/proto"
pkgerr "github.com/pkg/errors"

View File

@ -6,8 +6,8 @@ import (
"strings"
"time"
"github.com/bilibili/Kratos/pkg/conf/env"
"github.com/bilibili/Kratos/pkg/log"
"github.com/bilibili/kratos/pkg/conf/env"
"github.com/bilibili/kratos/pkg/log"
"github.com/pkg/errors"
)

View File

@ -5,7 +5,7 @@ import (
"net/http"
"net/http/httptrace"
"github.com/bilibili/Kratos/pkg/net/trace"
"github.com/bilibili/kratos/pkg/net/trace"
)
const _defaultComponentName = "net/http"

View File

@ -4,7 +4,7 @@ import (
"sync"
"time"
xtime "github.com/bilibili/Kratos/pkg/time"
xtime "github.com/bilibili/kratos/pkg/time"
)
// Config broker config.

View File

@ -6,9 +6,9 @@ import (
"sync/atomic"
"time"
"github.com/bilibili/Kratos/pkg/ecode"
"github.com/bilibili/Kratos/pkg/log"
"github.com/bilibili/Kratos/pkg/stat/summary"
"github.com/bilibili/kratos/pkg/ecode"
"github.com/bilibili/kratos/pkg/log"
"github.com/bilibili/kratos/pkg/stat/summary"
)
// sreBreaker is a sre CircuitBreaker pattern.

View File

@ -8,9 +8,9 @@ import (
"github.com/pkg/errors"
"github.com/bilibili/Kratos/pkg/conf/dsn"
"github.com/bilibili/Kratos/pkg/conf/env"
xtime "github.com/bilibili/Kratos/pkg/time"
"github.com/bilibili/kratos/pkg/conf/dsn"
"github.com/bilibili/kratos/pkg/conf/env"
xtime "github.com/bilibili/kratos/pkg/time"
)
var _traceDSN = "unixgram:///var/run/dapper-collect/dapper-collect.sock"

View File

@ -11,7 +11,7 @@ import (
"github.com/golang/protobuf/ptypes/duration"
"github.com/golang/protobuf/ptypes/timestamp"
protogen "github.com/bilibili/Kratos/pkg/net/trace/proto"
protogen "github.com/bilibili/kratos/pkg/net/trace/proto"
)
const protoVersion1 int32 = 1

View File

@ -4,7 +4,7 @@ import (
"fmt"
"time"
protogen "github.com/bilibili/Kratos/pkg/net/trace/proto"
protogen "github.com/bilibili/kratos/pkg/net/trace/proto"
)
const (

View File

@ -6,9 +6,9 @@ import (
"math/rand"
"time"
"github.com/bilibili/Kratos/pkg/conf/env"
"github.com/bilibili/Kratos/pkg/net/ip"
"github.com/bilibili/Kratos/pkg/net/metadata"
"github.com/bilibili/kratos/pkg/conf/env"
"github.com/bilibili/kratos/pkg/net/ip"
"github.com/bilibili/kratos/pkg/net/metadata"
"github.com/pkg/errors"
)
@ -45,7 +45,7 @@ type stackTracer interface {
type ctxKey string
var _ctxkey ctxKey = "Kratos/pkg/net/trace.trace"
var _ctxkey ctxKey = "kratos/pkg/net/trace.trace"
// FromContext returns the trace bound to the context, if any.
func FromContext(ctx context.Context) (t Trace, ok bool) {

View File

@ -1,7 +1,7 @@
package stat
import (
"github.com/bilibili/Kratos/pkg/stat/prom"
"github.com/bilibili/kratos/pkg/stat/prom"
)
// Stat interface.

View File

@ -75,8 +75,8 @@ import (
"{{.Name}}/internal/server/grpc"
"{{.Name}}/internal/server/http"
"{{.Name}}/internal/service"
"github.com/bilibili/Kratos/pkg/conf/paladin"
"github.com/bilibili/Kratos/pkg/log"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/log"
)
func main() {
@ -126,12 +126,12 @@ import (
"context"
"time"
"github.com/bilibili/Kratos/pkg/cache/memcache"
"github.com/bilibili/Kratos/pkg/cache/redis"
"github.com/bilibili/Kratos/pkg/conf/paladin"
"github.com/bilibili/Kratos/pkg/database/sql"
"github.com/bilibili/Kratos/pkg/log"
xtime "github.com/bilibili/Kratos/pkg/time"
"github.com/bilibili/kratos/pkg/cache/memcache"
"github.com/bilibili/kratos/pkg/cache/redis"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/database/sql"
"github.com/bilibili/kratos/pkg/log"
xtime "github.com/bilibili/kratos/pkg/time"
)
// Dao dao.
@ -233,7 +233,7 @@ import (
"context"
"{{.Name}}/internal/dao"
"github.com/bilibili/Kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/conf/paladin"
)
// Service service.
@ -274,7 +274,7 @@ import (
pb "{{.Name}}/api"
"{{.Name}}/internal/dao"
"github.com/bilibili/Kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/golang/protobuf/ptypes/empty"
)
@ -321,10 +321,10 @@ import (
"net/http"
"{{.Name}}/internal/service"
"github.com/bilibili/Kratos/pkg/conf/paladin"
"github.com/bilibili/Kratos/pkg/log"
bm "github.com/bilibili/Kratos/pkg/net/http/blademaster"
"github.com/bilibili/Kratos/pkg/net/http/blademaster/middleware/verify"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/log"
bm "github.com/bilibili/kratos/pkg/net/http/blademaster"
"github.com/bilibili/kratos/pkg/net/http/blademaster/middleware/verify"
)
var (
@ -425,8 +425,8 @@ message HelloReq {
import (
pb "{{.Name}}/api"
"{{.Name}}/internal/service"
"github.com/bilibili/Kratos/pkg/conf/paladin"
"github.com/bilibili/Kratos/pkg/net/rpc/warden"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/net/rpc/warden"
)
// New new a grpc server.

View File

@ -6,7 +6,7 @@ var toolIndexs = []*Tool{
&Tool{
Name: "kratos",
BuildTime: time.Date(2019, 4, 2, 0, 0, 0, 0, time.Local),
Install: "go get -u github.com/bilibili/Kratos/tool/kratos",
Install: "go get -u github.com/bilibili/kratos/tool/kratos",
Summary: "Kratos工具集本体",
Platform: []string{"darwin", "linux", "windows"},
Author: "kratos",