update linting

This commit is contained in:
Sergey Dudoladov
2019-10-02 13:36:54 +02:00
parent f0e29060b1
commit 7217046ef5
14 changed files with 60 additions and 42 deletions
+2 -2
View File
@@ -842,7 +842,7 @@ func (c *Cluster) initHumanUsers() error {
for _, postgresSuperuserTeam := range c.OpConfig.PostgresSuperuserTeams {
err := c.initTeamMembers(postgresSuperuserTeam, true)
if err != nil {
return fmt.Errorf("Cannot create a team %q of Postgres superusers: %v", postgresSuperuserTeam, err)
return fmt.Errorf("cannot create a team %q of Postgres superusers: %v", postgresSuperuserTeam, err)
}
if postgresSuperuserTeam == c.Spec.TeamID {
clusterIsOwnedBySuperuserTeam = true
@@ -856,7 +856,7 @@ func (c *Cluster) initHumanUsers() error {
err := c.initTeamMembers(c.Spec.TeamID, false)
if err != nil {
return fmt.Errorf("Cannot create a team %q of admins owning the PG cluster: %v", c.Spec.TeamID, err)
return fmt.Errorf("cannot create a team %q of admins owning the PG cluster: %v", c.Spec.TeamID, err)
}
return nil
+3 -2
View File
@@ -174,6 +174,7 @@ PatroniInitDBParams:
for _, k := range initdbOptionNames {
v := patroni.InitDB[k]
for i, defaultParam := range config.Bootstrap.Initdb {
//lint:ignore S1034 looks like false positive: defaultParam.(type) cannot be used outside of type switch
switch defaultParam.(type) {
case map[string]string:
{
@@ -1308,11 +1309,11 @@ func (c *Cluster) generateCloneEnvironment(description *acidv1.CloneDescription)
c.logger.Info(msg, description.S3WalPath)
envs := []v1.EnvVar{
v1.EnvVar{
{
Name: "CLONE_WAL_S3_BUCKET",
Value: c.OpConfig.WALES3Bucket,
},
v1.EnvVar{
{
Name: "CLONE_WAL_BUCKET_SCOPE_SUFFIX",
Value: getBucketScopeSuffix(description.UID),
},