fix: var-declaration linter findings
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
parent
e5ed45c258
commit
e664639e98
5 changed files with 8 additions and 8 deletions
|
|
@ -98,7 +98,7 @@ func setupLogging(ctx context.Context, logCfg config.Logging, hub *websocket.Hub
|
|||
}
|
||||
}()
|
||||
|
||||
var writers []io.Writer = []io.Writer{
|
||||
var writers = []io.Writer{
|
||||
logWriter,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ func (g GithubCredentials) RootCertificateBundle() (CertificateBundle, error) {
|
|||
ret := map[string][]byte{}
|
||||
|
||||
var block *pem.Block
|
||||
var rest []byte = g.CABundle
|
||||
var rest = g.CABundle
|
||||
for {
|
||||
block, rest = pem.Decode(rest)
|
||||
if block == nil {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import (
|
|||
)
|
||||
|
||||
func waitInstanceStatus(name string, status commonParams.InstanceStatus, runnerStatus params.RunnerStatus, timeout time.Duration) (*params.Instance, error) {
|
||||
var timeWaited time.Duration = 0
|
||||
var timeWaited time.Duration // default is 0
|
||||
var instance *params.Instance
|
||||
|
||||
slog.Info("Waiting for instance to reach desired status", "instance", name, "desired_status", status, "desired_runner_status", runnerStatus)
|
||||
|
|
@ -41,7 +41,7 @@ func DeleteInstance(name string, forceRemove bool) {
|
|||
}
|
||||
|
||||
func WaitInstanceToBeRemoved(name string, timeout time.Duration) error {
|
||||
var timeWaited time.Duration = 0
|
||||
var timeWaited time.Duration // default is 0
|
||||
var instance *params.Instance
|
||||
|
||||
slog.Info("Waiting for instance to be removed", "instance_name", name)
|
||||
|
|
@ -75,7 +75,7 @@ func WaitInstanceToBeRemoved(name string, timeout time.Duration) error {
|
|||
}
|
||||
|
||||
func WaitPoolInstances(poolID string, status commonParams.InstanceStatus, runnerStatus params.RunnerStatus, timeout time.Duration) error {
|
||||
var timeWaited time.Duration = 0
|
||||
var timeWaited time.Duration // default is 0
|
||||
|
||||
pool, err := getPool(cli, authToken, poolID)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ func ValidateJobLifecycle(label string) {
|
|||
}
|
||||
|
||||
func waitLabelledJob(label string, timeout time.Duration) (*params.Job, error) {
|
||||
var timeWaited time.Duration = 0
|
||||
var timeWaited time.Duration // default is 0
|
||||
var jobs params.Jobs
|
||||
var err error
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ func waitLabelledJob(label string, timeout time.Duration) (*params.Job, error) {
|
|||
}
|
||||
|
||||
func waitJobStatus(id int64, status params.JobStatus, timeout time.Duration) (*params.Job, error) {
|
||||
var timeWaited time.Duration = 0
|
||||
var timeWaited time.Duration // default is 0
|
||||
var job *params.Job
|
||||
|
||||
slog.Info("Waiting for job to reach status", "job_id", id, "status", status)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
func waitPoolNoInstances(id string, timeout time.Duration) error {
|
||||
var timeWaited time.Duration = 0
|
||||
var timeWaited time.Duration // default is 0
|
||||
var pool *params.Pool
|
||||
var err error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue