From 5f4c89bc3fdd9f109542391292bb3b9ce517f37d Mon Sep 17 00:00:00 2001 From: Elviie <84927906+Massinja@users.noreply.github.com> Date: Tue, 5 Mar 2024 06:40:36 -0500 Subject: [PATCH] [*] switch to compound assignment operators (#642) --- internal/pgengine/bootstrap.go | 2 +- internal/scheduler/chain.go | 2 +- internal/scheduler/tasks.go | 2 +- internal/tasks/files.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/pgengine/bootstrap.go b/internal/pgengine/bootstrap.go index c0ad9426..7ea631bd 100644 --- a/internal/pgengine/bootstrap.go +++ b/internal/pgengine/bootstrap.go @@ -147,7 +147,7 @@ func (pge *PgEngine) getPgxConnConfig() *pgxpool.Config { connstr = fmt.Sprintf("host='%s' port='%d' dbname='%s' sslmode='%s' user='%s'", pge.Connection.Host, pge.Connection.Port, pge.Connection.DBName, pge.Connection.SSLMode, pge.Connection.User) if pge.Connection.Password != "" { - connstr = connstr + fmt.Sprintf(" password='%s'", pge.Connection.Password) + connstr += fmt.Sprintf(" password='%s'", pge.Connection.Password) } } connConfig, err := pgxpool.ParseConfig(connstr) diff --git a/internal/scheduler/chain.go b/internal/scheduler/chain.go index 225b4104..964ee5a2 100644 --- a/internal/scheduler/chain.go +++ b/internal/scheduler/chain.go @@ -87,7 +87,7 @@ func (sch *Scheduler) retrieveChainsAndRun(ctx context.Context, reboot bool) { var headChains []Chain msg := "Retrieve scheduled chains to run" if reboot { - msg = msg + " @reboot" + msg += " @reboot" } if reboot { err = sch.pgengine.SelectRebootChains(ctx, &headChains) diff --git a/internal/scheduler/tasks.go b/internal/scheduler/tasks.go index 8b9f525f..cfa27ec3 100644 --- a/internal/scheduler/tasks.go +++ b/internal/scheduler/tasks.go @@ -38,7 +38,7 @@ func (sch *Scheduler) executeBuiltinTask(ctx context.Context, name string, param if s, err = f(ctx, sch, val); err != nil { return } - stdout = stdout + fmt.Sprintln(s) + stdout += fmt.Sprintln(s) } return } diff --git a/internal/tasks/files.go b/internal/tasks/files.go index d54c3c45..c8fb8c92 100644 --- a/internal/tasks/files.go +++ b/internal/tasks/files.go @@ -29,7 +29,7 @@ func DownloadUrls(ctx context.Context, urls []string, dest string, workers int) if err = resp.Err(); err != nil { errstrings = append(errstrings, err.Error()) } else { - out = out + fmt.Sprintf("Downloaded %s to %s\n", resp.Request.URL(), resp.Filename) + out += fmt.Sprintf("Downloaded %s to %s\n", resp.Request.URL(), resp.Filename) } } if len(errstrings) > 0 {