mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-28 03:57:02 +02:00
feat: golangci add goimports local-prefixes (#2413)
* feat: golangci goimports local-prefixes * fix lint * fix lint
This commit is contained in:
parent
9f65c1a03d
commit
69fcd50c0a
@ -67,3 +67,5 @@ linters-settings:
|
||||
gocyclo:
|
||||
# recommend 10-20
|
||||
min-complexity: 50
|
||||
goimports:
|
||||
local-prefixes: github.com/go-kratos/kratos # Put imports beginning with prefix after 3rd-party packages
|
||||
|
@ -9,10 +9,10 @@ import (
|
||||
"github.com/go-chassis/cari/discovery"
|
||||
"github.com/go-chassis/cari/pkg/errsvc"
|
||||
"github.com/go-chassis/sc-client"
|
||||
"github.com/gofrs/uuid"
|
||||
|
||||
"github.com/go-kratos/kratos/v2/log"
|
||||
"github.com/go-kratos/kratos/v2/registry"
|
||||
"github.com/gofrs/uuid"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -6,8 +6,9 @@ import (
|
||||
|
||||
pb "github.com/go-chassis/cari/discovery"
|
||||
"github.com/go-chassis/sc-client"
|
||||
"github.com/go-kratos/kratos/v2/registry"
|
||||
"github.com/gofrs/uuid"
|
||||
|
||||
"github.com/go-kratos/kratos/v2/registry"
|
||||
)
|
||||
|
||||
var r *Registry
|
||||
|
@ -2,9 +2,9 @@ package servicecomb
|
||||
|
||||
import (
|
||||
"github.com/go-chassis/sc-client"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/go-kratos/kratos/v2/registry"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
var _ registry.Watcher = (*Watcher)(nil)
|
||||
|
@ -4,8 +4,9 @@ import (
|
||||
"reflect"
|
||||
"regexp"
|
||||
|
||||
"github.com/go-kratos/kratos/v2/encoding/form"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/go-kratos/kratos/v2/encoding/form"
|
||||
)
|
||||
|
||||
var reg = regexp.MustCompile(`{[\\.\w]+}`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user