Skip to content

Commit c99927a

Browse files
Bump mvdan.cc/gofumpt from 0.8.0 to 0.9.0 in /tools (#4465)
* Bump mvdan.cc/gofumpt from 0.8.0 to 0.9.0 in /tools Bumps [mvdan.cc/gofumpt](https://github.com/mvdan/gofumpt) from 0.8.0 to 0.9.0. - [Release notes](https://github.com/mvdan/gofumpt/releases) - [Changelog](https://github.com/mvdan/gofumpt/blob/master/CHANGELOG.md) - [Commits](mvdan/gofumpt@v0.8.0...v0.9.0) --- updated-dependencies: - dependency-name: mvdan.cc/gofumpt dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Apply gofumpt fixes --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alex Demidoff <alex@demidoff.me>
1 parent f99094b commit c99927a

15 files changed

Lines changed: 21 additions & 21 deletions

File tree

agent/client/client.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -866,23 +866,23 @@ func getNetworkInformation(channel *channel.Channel) (latency, clockDrift time.D
866866
var resp agentv1.ServerResponsePayload
867867
resp, err = channel.SendAndWaitResponse(&agentv1.Ping{})
868868
if err != nil {
869-
return
869+
return latency, clockDrift, err
870870
}
871871
if resp == nil {
872872
err = channel.Wait()
873-
return
873+
return latency, clockDrift, err
874874
}
875875
roundtrip := time.Since(start)
876876
currentTime := resp.(*agentv1.Pong).CurrentTime //nolint:forcetypeassert
877877
serverTime := currentTime.AsTime()
878878
err = currentTime.CheckValid()
879879
if err != nil {
880880
err = errors.Wrap(err, "Failed to decode Ping")
881-
return
881+
return latency, clockDrift, err
882882
}
883883
latency = roundtrip / 2
884884
clockDrift = serverTime.Sub(start) - latency
885-
return
885+
return latency, clockDrift, err
886886
}
887887

888888
// GetNetworkInformation sends ping request to the server and returns info about latency and clock drift.
@@ -892,11 +892,11 @@ func (c *Client) GetNetworkInformation() (latency, clockDrift time.Duration, err
892892
c.rw.RUnlock()
893893
if channel == nil {
894894
err = errors.New("not connected")
895-
return
895+
return latency, clockDrift, err
896896
}
897897

898898
latency, clockDrift, err = getNetworkInformation(channel)
899-
return
899+
return latency, clockDrift, err
900900
}
901901

902902
// GetServerConnectMetadata returns current server's metadata, or nil.

agent/client/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func setup(t *testing.T, connect func(server agentv1.AgentService_ConnectServer)
7272
require.NoError(t, <-serveError)
7373
}
7474

75-
return
75+
return port, teardown
7676
}
7777

7878
func TestClient(t *testing.T) {

api-tests/management/external_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ func TestRemoveExternal(t *testing.T) {
441441
require.NotNil(t, addExternalOK)
442442
require.NotNil(t, addExternalOK.Payload.External.Service)
443443
serviceID = addExternalOK.Payload.External.Service.ServiceID
444-
return
444+
return nodeID, serviceID
445445
}
446446

447447
t.Run("By name", func(t *testing.T) {

api-tests/management/haproxy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ func TestRemoveHAProxy(t *testing.T) {
399399
require.NotNil(t, addHAProxyOK)
400400
require.NotNil(t, addHAProxyOK.Payload.Haproxy.Service)
401401
serviceID = addHAProxyOK.Payload.Haproxy.Service.ServiceID
402-
return
402+
return nodeID, serviceID
403403
}
404404

405405
t.Run("By name", func(t *testing.T) {

api-tests/management/mongodb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ func TestRemoveMongoDB(t *testing.T) {
922922
require.NotNil(t, addMongoDBOK)
923923
require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service)
924924
serviceID = addMongoDBOK.Payload.Mongodb.Service.ServiceID
925-
return
925+
return nodeID, pmmAgentID, serviceID
926926
}
927927

928928
t.Run("By name", func(t *testing.T) {

api-tests/management/mysql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ func TestRemoveMySQL(t *testing.T) {
920920
require.NotNil(t, addMySQLOK)
921921
require.NotNil(t, addMySQLOK.Payload.Mysql.Service)
922922
serviceID = addMySQLOK.Payload.Mysql.Service.ServiceID
923-
return //nolint:nakedret
923+
return nodeID, pmmAgentID, serviceID
924924
}
925925

926926
t.Run("By name", func(t *testing.T) {

api-tests/management/postgresql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ func TestRemovePostgreSQL(t *testing.T) {
887887
require.NotNil(t, addPostgreSQLOK)
888888
require.NotNil(t, addPostgreSQLOK.Payload.Postgresql.Service)
889889
serviceID = addPostgreSQLOK.Payload.Postgresql.Service.ServiceID
890-
return
890+
return nodeID, pmmAgentID, serviceID
891891
}
892892

893893
t.Run("By name", func(t *testing.T) {

api-tests/management/proxysql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ func TestRemoveProxySQL(t *testing.T) {
642642
require.NotNil(t, addProxySQLOK)
643643
require.NotNil(t, addProxySQLOK.Payload.Proxysql.Service)
644644
serviceID = addProxySQLOK.Payload.Proxysql.Service.ServiceID
645-
return
645+
return nodeID, pmmAgentID, serviceID
646646
}
647647

648648
t.Run("By name", func(t *testing.T) {

managed/models/action_helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestActionHelpers(t *testing.T) {
5959
t.Helper()
6060
require.NoError(t, tx.Rollback())
6161
}
62-
return
62+
return q, teardown
6363
}
6464

6565
t.Run("FindActionResultByID", func(t *testing.T) {

managed/services/checks/checks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,7 @@ func groupChecksByDB(l *logrus.Entry, checks map[string]check.Check) (mySQLCheck
16131613
}
16141614
}
16151615

1616-
return
1616+
return mySQLChecks, postgreSQLChecks, mongoDBChecks
16171617
}
16181618

16191619
// check interfaces.

0 commit comments

Comments
 (0)