Skip to content

Commit

Permalink
add //nolint:unparam,varcheck above custom conversion functions
Browse files Browse the repository at this point in the history
Signed-off-by: ashnamehrotra <[email protected]>
  • Loading branch information
ashnamehrotra committed Dec 1, 2023
1 parent e1ba0a4 commit 5d939a4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions api/v1alpha3/custom_conversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,39 @@ import (
conversion "k8s.io/apimachinery/pkg/conversion"
)

// The following were added manually for ManagerConfig RuntimeSpec conversions:

//nolint:unparam,varcheck
func Convert_v1alpha3_ManagerConfig_To_unversioned_ManagerConfig(in *ManagerConfig, out *unversioned.ManagerConfig, s conversion.Scope) error {

Check warning on line 9 in api/v1alpha3/custom_conversions.go

View workflow job for this annotation

GitHub Actions / Lint

var-naming: don't use underscores in Go names; func Convert_v1alpha3_ManagerConfig_To_unversioned_ManagerConfig should be ConvertV1alpha3ManagerConfigToUnversionedManagerConfig (revive)
return autoConvert_v1alpha3_ManagerConfig_To_unversioned_ManagerConfig(in, out, s)
}

// TODO: change this to use unversioned.RuntimeSpec when unversioned is updated
//
//nolint:unparam,varcheck
func autoConvert_v1alpha3_RuntimeSpec_To_unversioned_Runtime(in *RuntimeSpec, out *unversioned.Runtime, s conversion.Scope) error {

Check warning on line 16 in api/v1alpha3/custom_conversions.go

View workflow job for this annotation

GitHub Actions / Lint

unused-parameter: parameter 's' seems to be unused, consider removing or renaming it as _ (revive)
*out = unversioned.Runtime(in.Name)
return nil
}

//nolint:unparam,varcheck
func Convert_v1alpha3_RuntimeSpec_To_unversioned_Runtime(in *RuntimeSpec, out *unversioned.Runtime, s conversion.Scope) error {

Check warning on line 22 in api/v1alpha3/custom_conversions.go

View workflow job for this annotation

GitHub Actions / Lint

var-naming: don't use underscores in Go names; func Convert_v1alpha3_RuntimeSpec_To_unversioned_Runtime should be ConvertV1alpha3RuntimeSpecToUnversionedRuntime (revive)
return autoConvert_v1alpha3_RuntimeSpec_To_unversioned_Runtime(in, out, s)
}

//nolint:unparam,varcheck
func Convert_unversioned_ManagerConfig_To_v1alpha3_ManagerConfig(in *unversioned.ManagerConfig, out *ManagerConfig, s conversion.Scope) error {

Check warning on line 27 in api/v1alpha3/custom_conversions.go

View workflow job for this annotation

GitHub Actions / Lint

var-naming: don't use underscores in Go names; func Convert_unversioned_ManagerConfig_To_v1alpha3_ManagerConfig should be ConvertUnversionedManagerConfigToV1alpha3ManagerConfig (revive)
return autoConvert_unversioned_ManagerConfig_To_v1alpha3_ManagerConfig(in, out, s)
}

// TODO: change this to use unversioned.RuntimeSpec when unversioned is updated
//
//nolint:unparam,varcheck
func autoConvert_unversioned_Runtime_To_v1alpha3_RuntimeSpec(in *unversioned.Runtime, out *RuntimeSpec, s conversion.Scope) error {

Check warning on line 34 in api/v1alpha3/custom_conversions.go

View workflow job for this annotation

GitHub Actions / Lint

unused-parameter: parameter 's' seems to be unused, consider removing or renaming it as _ (revive)
out.Name = Runtime(string(*in))
out.Address = RuntimeAddress("")
return nil
}

//nolint:unparam,varcheck
func Convert_unversioned_Runtime_To_v1alpha3_RuntimeSpec(in *unversioned.Runtime, out *RuntimeSpec, s conversion.Scope) error {

Check warning on line 41 in api/v1alpha3/custom_conversions.go

View workflow job for this annotation

GitHub Actions / Lint

var-naming: don't use underscores in Go names; func Convert_unversioned_Runtime_To_v1alpha3_RuntimeSpec should be ConvertUnversionedRuntimeToV1alpha3RuntimeSpec (revive)
return autoConvert_unversioned_Runtime_To_v1alpha3_RuntimeSpec(in, out, s)
}

0 comments on commit 5d939a4

Please sign in to comment.