Skip to content

Commit

Permalink
misc: remove unused bits of code
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Oct 13, 2023
1 parent 711b3f7 commit bfed15b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
14 changes: 6 additions & 8 deletions cmd/flux/create_image_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ the status of the object.`),
RunE: createImagePolicyRun}

type imagePolicyFlags struct {
imageRef string
semver string
alpha string
numeric string
filterRegex string
filterExtract string
filterNumerical string
imageRef string
semver string
alpha string
numeric string
filterRegex string
filterExtract string
}

var imagePolicyArgs = imagePolicyFlags{}
Expand Down Expand Up @@ -183,7 +182,6 @@ func validateExtractStr(template string, capNames []string) error {
name, num, rest, ok := extract(template)
if !ok {
// Malformed extract string, assume user didn't want this
template = template[1:]
return fmt.Errorf("--filter-extract is malformed")
}
template = rest
Expand Down
1 change: 0 additions & 1 deletion cmd/flux/export_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ type exportableWithSecretList interface {
}

type exportWithSecretCommand struct {
apiType
object exportableWithSecret
list exportableWithSecretList
}
Expand Down
2 changes: 0 additions & 2 deletions cmd/flux/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,6 @@ type cmdTestCase struct {
// Tests use assertFunc to assert on an output, success or failure. This
// can be a function defined by the test or existing function above.
assert assertFunc
// Filename that contains yaml objects to load into Kubernetes
objectFile string
}

func (cmd *cmdTestCase) runTestCmd(t *testing.T) {
Expand Down
4 changes: 0 additions & 4 deletions cmd/flux/reconcile_image_updateauto.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ func init() {
reconcileImageCmd.AddCommand(reconcileImageUpdateCmd)
}

func (obj imageUpdateAutomationAdapter) suspended() bool {
return obj.ImageUpdateAutomation.Spec.Suspend
}

func (obj imageUpdateAutomationAdapter) lastHandledReconcileRequest() string {
return obj.Status.GetLastHandledReconcileRequest()
}
Expand Down

0 comments on commit bfed15b

Please sign in to comment.