Skip to content

Commit

Permalink
review: Make review changes
Browse files Browse the repository at this point in the history
Signed-off-by: Yannis Zarkadas <yanniszark@gmail.com>
  • Loading branch information
yanniszark committed Dec 2, 2022
1 parent 4e0cb79 commit e581778
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions api/types/sortoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ type SortOptions struct {
// SortOrder defines different ordering strategies.
type SortOrder string

var LegacySortOrder SortOrder = "legacy"
var FIFOSortOrder SortOrder = "fifo"
const LegacySortOrder SortOrder = "legacy"
const FIFOSortOrder SortOrder = "fifo"

// LegacySortOptions define various options for tweaking the "legacy" ordering
// strategy.
Expand Down
2 changes: 1 addition & 1 deletion kustomize/commands/build/reorderoutput.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func validateFlagReorderOutput() error {
func getFlagReorderOutput(flags *flag.FlagSet) krusty.ReorderOption {
isReorderSet := flags.Changed(flagReorderOutputName)
if !isReorderSet {
theFlags.reorderOutput = string(krusty.ReorderOptionUnspecified)
return krusty.ReorderOptionUnspecified
}
switch theFlags.reorderOutput {
case string(krusty.ReorderOptionNone):
Expand Down
1 change: 1 addition & 0 deletions plugin/builtin/sortordertransformer/Makefile
4 changes: 2 additions & 2 deletions plugin/builtin/sortordertransformer/SortOrderTransformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func (p *plugin) Transform(m resmap.ResMap) (err error) {
return nil
}

// applySortOrder takes resources (given in resmap) and a desired ordering given
// as a sequence of ResIds, and updates the resmap's resources to match the
// applyOrdering takes resources (given in ResMap) and a desired ordering given
// as a sequence of ResIds, and updates the ResMap's resources to match the
// ordering.
func applyOrdering(m resmap.ResMap, ordering []resid.ResId) error {
var err error
Expand Down
6 changes: 1 addition & 5 deletions plugin/builtin/sortordertransformer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.0
sigs.k8s.io/kustomize/api v0.8.9
sigs.k8s.io/kustomize/api v0.12.1
sigs.k8s.io/kustomize/kyaml v0.13.9
sigs.k8s.io/yaml v1.2.0
)
Expand Down Expand Up @@ -37,7 +37,3 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/kube-openapi v0.0.0-20220401212409-b28bf2818661 // indirect
)

replace sigs.k8s.io/kustomize/api => ../../../api

replace sigs.k8s.io/kustomize/kyaml => ../../../kyaml

0 comments on commit e581778

Please sign in to comment.