From cf42289c8b67416d83dcc5b6da53f070f4ef13da Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Tue, 16 Oct 2018 16:42:19 -0700 Subject: [PATCH] fix linter errors --- client/allocrunner/taskrunner/lifecycle.go | 2 +- client/allocrunner/taskrunner/task_runner.go | 2 +- drivers/rkt/driver.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/allocrunner/taskrunner/lifecycle.go b/client/allocrunner/taskrunner/lifecycle.go index a561ec8da..7a3146480 100644 --- a/client/allocrunner/taskrunner/lifecycle.go +++ b/client/allocrunner/taskrunner/lifecycle.go @@ -91,7 +91,7 @@ func (tr *TaskRunner) Kill(ctx context.Context, event *structs.TaskEvent) error waitCh, err := handle.WaitCh(ctx) // The error should be nil or TaskNotFound, if it's something else then a - // failure in the driver or transport layer occured + // failure in the driver or transport layer occurred if err != nil { if err == drivers.ErrTaskNotFound { return nil diff --git a/client/allocrunner/taskrunner/task_runner.go b/client/allocrunner/taskrunner/task_runner.go index 49c560b50..8dffd65a4 100644 --- a/client/allocrunner/taskrunner/task_runner.go +++ b/client/allocrunner/taskrunner/task_runner.go @@ -735,7 +735,7 @@ func (tr *TaskRunner) appendEvent(event *structs.TaskEvent) error { // Ensure the event is populated with human readable strings event.PopulateEventDisplayMessage() - // Propogate failure from event to task state + // Propagate failure from event to task state if event.FailsTask { tr.state.Failed = true } diff --git a/drivers/rkt/driver.go b/drivers/rkt/driver.go index a06c8b9d0..211a1075a 100644 --- a/drivers/rkt/driver.go +++ b/drivers/rkt/driver.go @@ -462,10 +462,10 @@ func (d *RktDriver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *cs } // Add memory isolator - prepareArgs = append(prepareArgs, fmt.Sprintf("--memory=%v", int64(cfg.Resources.LinuxResources.MemoryLimitBytes))) + prepareArgs = append(prepareArgs, fmt.Sprintf("--memory=%v", cfg.Resources.LinuxResources.MemoryLimitBytes)) // Add CPU isolator - prepareArgs = append(prepareArgs, fmt.Sprintf("--cpu-shares=%v", int64(cfg.Resources.LinuxResources.CPUShares))) + prepareArgs = append(prepareArgs, fmt.Sprintf("--cpu-shares=%v", cfg.Resources.LinuxResources.CPUShares)) // Add DNS servers if len(driverConfig.DNSServers) == 1 && (driverConfig.DNSServers[0] == "host" || driverConfig.DNSServers[0] == "none") {