From e961751d94a778f58fdde891a7e0ad5ff260ef49 Mon Sep 17 00:00:00 2001 From: James Rasell Date: Thu, 13 Jan 2022 11:32:16 +0100 Subject: [PATCH] chore: ensure consistent file naming for non-enterprise files. --- nomad/{fsm_not_ent.go => fsm_oss.go} | 2 +- nomad/{plan_apply_not_ent.go => plan_apply_oss.go} | 2 +- scheduler/stack_not_ent.go | 8 -------- scheduler/stack_oss.go | 8 ++++++++ 4 files changed, 10 insertions(+), 10 deletions(-) rename nomad/{fsm_not_ent.go => fsm_oss.go} (74%) rename nomad/{plan_apply_not_ent.go => plan_apply_oss.go} (87%) delete mode 100644 scheduler/stack_not_ent.go create mode 100644 scheduler/stack_oss.go diff --git a/nomad/fsm_not_ent.go b/nomad/fsm_oss.go similarity index 74% rename from nomad/fsm_not_ent.go rename to nomad/fsm_oss.go index b21ca608e..2c9d1e62d 100644 --- a/nomad/fsm_not_ent.go +++ b/nomad/fsm_oss.go @@ -5,6 +5,6 @@ package nomad // allocQuota returns the quota object associated with the allocation. In // anything but Premium this will always be empty -func (n *nomadFSM) allocQuota(allocID string) (string, error) { +func (n *nomadFSM) allocQuota(_ string) (string, error) { return "", nil } diff --git a/nomad/plan_apply_not_ent.go b/nomad/plan_apply_oss.go similarity index 87% rename from nomad/plan_apply_not_ent.go rename to nomad/plan_apply_oss.go index 44534cab6..e1b540edc 100644 --- a/nomad/plan_apply_not_ent.go +++ b/nomad/plan_apply_oss.go @@ -23,6 +23,6 @@ func refreshIndex(snap *state.StateSnapshot) (uint64, error) { } // evaluatePlanQuota returns whether the plan would be over quota -func evaluatePlanQuota(snap *state.StateSnapshot, plan *structs.Plan) (bool, error) { +func evaluatePlanQuota(_ *state.StateSnapshot, _ *structs.Plan) (bool, error) { return false, nil } diff --git a/scheduler/stack_not_ent.go b/scheduler/stack_not_ent.go deleted file mode 100644 index 7214c6be8..000000000 --- a/scheduler/stack_not_ent.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build !ent -// +build !ent - -package scheduler - -func NewQuotaIterator(ctx Context, source FeasibleIterator) FeasibleIterator { - return source -} diff --git a/scheduler/stack_oss.go b/scheduler/stack_oss.go new file mode 100644 index 000000000..3bc628b10 --- /dev/null +++ b/scheduler/stack_oss.go @@ -0,0 +1,8 @@ +//go:build !ent +// +build !ent + +package scheduler + +func NewQuotaIterator(_ Context, source FeasibleIterator) FeasibleIterator { + return source +}