style: 合入后修 gofmt/govet 与 RegistrationView 类型检查
This commit is contained in:
+2
-2
@@ -91,8 +91,8 @@ func Run(cfg Config) (*Report, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := Provision(cfg, ids); err != nil {
|
||||
return nil, err
|
||||
if provErr := Provision(cfg, ids); provErr != nil {
|
||||
return nil, provErr
|
||||
}
|
||||
clients, err := ConnectAll(cfg, ids)
|
||||
if err != nil {
|
||||
|
||||
+6
-6
@@ -80,8 +80,8 @@ func (c *Client) connectSubscribeHello(password string, timeout time.Duration) e
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := c.mc.Send(pkt); err != nil {
|
||||
return fmt.Errorf("%s CONNECT: %w", c.ID, err)
|
||||
if sendErr := c.mc.Send(pkt); sendErr != nil {
|
||||
return fmt.Errorf("%s CONNECT: %w", c.ID, sendErr)
|
||||
}
|
||||
ack, err := c.mc.Recv()
|
||||
if err != nil {
|
||||
@@ -99,11 +99,11 @@ func (c *Client) connectSubscribeHello(password string, timeout time.Duration) e
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := c.mc.Send(sub); err != nil {
|
||||
return fmt.Errorf("%s SUBSCRIBE: %w", c.ID, err)
|
||||
if sendErr := c.mc.Send(sub); sendErr != nil {
|
||||
return fmt.Errorf("%s SUBSCRIBE: %w", c.ID, sendErr)
|
||||
}
|
||||
if _, err := c.mc.Recv(); err != nil {
|
||||
return fmt.Errorf("%s SUBACK: %w", c.ID, err)
|
||||
if _, recvErr := c.mc.Recv(); recvErr != nil {
|
||||
return fmt.Errorf("%s SUBACK: %w", c.ID, recvErr)
|
||||
}
|
||||
|
||||
hello := protocol.Hello{V: protocol.Version, Type: protocol.TypeHello, RID: "h0", Client: "mqttbench/0.1"}
|
||||
|
||||
@@ -108,8 +108,8 @@ func TestMQTT5ConnectFakeBroker(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := mc.Send(pkt); err != nil {
|
||||
t.Fatal(err)
|
||||
if sendErr := mc.Send(pkt); sendErr != nil {
|
||||
t.Fatal(sendErr)
|
||||
}
|
||||
ack, err := mc.Recv()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user