diff --git a/command/plan.go b/command/plan.go index 5c6ac3333..f0fd292c2 100644 --- a/command/plan.go +++ b/command/plan.go @@ -206,7 +206,7 @@ func formatJobDiff(job *api.JobDiff, verbose bool) string { out := fmt.Sprintf("%s[bold]Job: %q\n", marker, job.ID) // Determine the longest markers and fields so that the output can be - // properly alligned. + // properly aligned. longestField, longestMarker := getLongestPrefixes(job.Fields, job.Objects) for _, tg := range job.TaskGroups { if _, l := getDiffString(tg.Type); l > longestMarker { @@ -275,7 +275,7 @@ func formatTaskGroupDiff(tg *api.TaskGroupDiff, tgPrefix int, verbose bool) stri } // Determine the longest field and markers so the output is properly - // alligned + // aligned longestField, longestMarker := getLongestPrefixes(tg.Fields, tg.Objects) for _, task := range tg.Tasks { if _, l := getDiffString(task.Type); l > longestMarker { @@ -307,7 +307,7 @@ func formatTaskGroupDiff(tg *api.TaskGroupDiff, tgPrefix int, verbose bool) stri // formatTaskDiff produces an annotated diff of a task. If the verbose field is // set, the tasks fields and objects are expanded even if the full object is an // addition or removal. startPrefix is the number of spaces to prefix the output of -// the task and taskPrefix is the number of spaces to put betwen the marker and +// the task and taskPrefix is the number of spaces to put between the marker and // task name output. func formatTaskDiff(task *api.TaskDiff, startPrefix, taskPrefix int, verbose bool) string { marker, _ := getDiffString(task.Type) @@ -334,7 +334,7 @@ func formatTaskDiff(task *api.TaskDiff, startPrefix, taskPrefix int, verbose boo // formatObjectDiff produces an annotated diff of an object. startPrefix is the // number of spaces to prefix the output of the object and keyPrefix is the number -// of spaces to put betwen the marker and object name output. +// of spaces to put between the marker and object name output. func formatObjectDiff(diff *api.ObjectDiff, startPrefix, keyPrefix int) string { start := strings.Repeat(" ", startPrefix) marker, _ := getDiffString(diff.Type) @@ -350,7 +350,7 @@ func formatObjectDiff(diff *api.ObjectDiff, startPrefix, keyPrefix int) string { // formatFieldDiff produces an annotated diff of a field. startPrefix is the // number of spaces to prefix the output of the field, keyPrefix is the number -// of spaces to put betwen the marker and field name output and valuePrefix is +// of spaces to put between the marker and field name output and valuePrefix is // the number of spaces to put infront of the value for aligning values. func formatFieldDiff(diff *api.FieldDiff, startPrefix, keyPrefix, valuePrefix int) string { marker, _ := getDiffString(diff.Type) diff --git a/nomad/blocked_evals.go b/nomad/blocked_evals.go index 05ef7b717..47801a18f 100644 --- a/nomad/blocked_evals.go +++ b/nomad/blocked_evals.go @@ -128,7 +128,7 @@ func (b *BlockedEvals) Block(eval *structs.Evaluation) { // Reblock tracks the passed evaluation and enqueues it into the eval broker when // a suitable node calls unblock. Reblock should be used over Block when the -// blocking is occuring by an outstanding evaluation. The token is the +// blocking is occurring by an outstanding evaluation. The token is the // evaluation's token. func (b *BlockedEvals) Reblock(eval *structs.Evaluation, token string) { b.processBlock(eval, token) @@ -245,7 +245,7 @@ func (b *BlockedEvals) Unblock(computedClass string, index uint64) { // Store the index in which the unblock happened. We use this on subsequent // block calls in case the evaluation was in the scheduler when a trigger - // occured. + // occurred. b.unblockIndexes[computedClass] = index b.l.Unlock() diff --git a/nomad/blocked_evals_test.go b/nomad/blocked_evals_test.go index c0347da5a..75d8207f6 100644 --- a/nomad/blocked_evals_test.go +++ b/nomad/blocked_evals_test.go @@ -291,7 +291,7 @@ func TestBlockedEvals_Block_ImmediateUnblock_Escaped(t *testing.T) { } // Test the block case in which the eval should be immediately unblocked since -// there is an unblock on an unseen class that occured while it was in the +// there is an unblock on an unseen class that occurred while it was in the // scheduler func TestBlockedEvals_Block_ImmediateUnblock_UnseenClass_After(t *testing.T) { blocked, broker := testBlockedEvals(t) @@ -327,7 +327,7 @@ func TestBlockedEvals_Block_ImmediateUnblock_UnseenClass_After(t *testing.T) { } // Test the block case in which the eval should not immediately unblock since -// there is an unblock on an unseen class that occured before it was in the +// there is an unblock on an unseen class that occurred before it was in the // scheduler func TestBlockedEvals_Block_ImmediateUnblock_UnseenClass_Before(t *testing.T) { blocked, _ := testBlockedEvals(t) diff --git a/nomad/core_sched.go b/nomad/core_sched.go index 00cae976a..c3099e0a1 100644 --- a/nomad/core_sched.go +++ b/nomad/core_sched.go @@ -373,7 +373,7 @@ OUTER: // If there are any non-terminal allocations, skip the node. If the node // is terminal and the allocations are not, the scheduler may not have - // run yet to transistion the allocs on the node to terminal. We delay + // run yet to transition the allocs on the node to terminal. We delay // GC'ing until this happens. for _, alloc := range allocs { if !alloc.TerminalStatus() { diff --git a/scheduler/util.go b/scheduler/util.go index 269a4b4f0..5e12e119e 100644 --- a/scheduler/util.go +++ b/scheduler/util.go @@ -84,9 +84,9 @@ func diffAllocs(job *structs.Job, taintedNodes map[string]bool, // If we are on a tainted node, we must migrate if we are a service or // if the batch allocation did not finish if taintedNodes[exist.NodeID] { - // If the job is batch and finished succesfully, the fact that the + // If the job is batch and finished successfully, the fact that the // node is tainted does not mean it should be migrated as the work - // was already succesfully finished. However for service/system + // was already successfully finished. However for service/system // jobs, tasks should never complete. The check of batch type, // defends against client bugs. if exist.Job.Type == structs.JobTypeBatch && exist.RanSuccessfully() {