chore: update code format. (#628)

This commit is contained in:
Bo-Yi Wu
2021-04-15 19:49:17 +08:00
committed by GitHub
parent 7e087de6e6
commit afd9ff889e
68 changed files with 390 additions and 414 deletions

View File

@@ -36,8 +36,7 @@ func init() {
balancer.Register(newBuilder())
}
type p2cPickerBuilder struct {
}
type p2cPickerBuilder struct{}
func newBuilder() balancer.Builder {
return base.NewBalancerBuilder(Name, new(p2cPickerBuilder))

View File

@@ -103,8 +103,7 @@ func TestP2cPicker_Pick(t *testing.T) {
}
}
type mockClientConn struct {
}
type mockClientConn struct{}
func (m mockClientConn) UpdateAddresses(addresses []resolver.Address) {
}

View File

@@ -14,9 +14,11 @@ It has these top-level messages:
*/
package mock
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
proto "github.com/golang/protobuf/proto"
fmt "fmt"
math "math"
)
import (
context "golang.org/x/net/context"
@@ -24,9 +26,11 @@ import (
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var (
_ = proto.Marshal
_ = fmt.Errorf
_ = math.Inf
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
@@ -72,8 +76,10 @@ func init() {
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
var (
_ context.Context
_ grpc.ClientConn
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.

View File

@@ -8,8 +8,7 @@ import (
)
// DepositServer is used for mocking.
type DepositServer struct {
}
type DepositServer struct{}
// Deposit handles the deposit requests.
func (*DepositServer) Deposit(ctx context.Context, req *DepositRequest) (*DepositResponse, error) {

View File

@@ -67,8 +67,7 @@ func (m mockedShedder) Allow() (load.Promise, error) {
return nil, load.ErrServiceOverloaded
}
type mockedPromise struct {
}
type mockedPromise struct{}
func (m mockedPromise) Pass() {
}