Skip to content

Commit 15b6a55

Browse files
authored
Merge pull request #840 from n3wscott/fix-dupe-interface
fix lint issue on deprecated interfaces
2 parents 0002011 + fa083bc commit 15b6a55

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

pkg/reconciler/managed/reconciler_deprecated.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ type TypedExternalConnecter[managed resource.Managed] interface {
3636
//
3737
// Deprecated: Please use Disconnect() on the ExternalClient for disconnecting
3838
// from the provider.
39+
//
40+
//nolint:iface // We know it is a redundant interface.
3941
type ExternalDisconnector interface {
4042
// Disconnect from the provider and close the ExternalClient.
4143
Disconnect(ctx context.Context) error
@@ -45,6 +47,8 @@ type ExternalDisconnector interface {
4547
//
4648
// Deprecated: Please use Disconnect() on the ExternalClient for disconnecting
4749
// from the provider.
50+
//
51+
//nolint:iface // We know it is a redundant interface
4852
type ExternalDisconnecter interface {
4953
ExternalDisconnector
5054
}

pkg/reference/reference.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func ToIntPtrValue(v string) *int64 {
107107
// string pointers and need to be resolved as part of `ResolveMultiple`.
108108
func FromPtrValues(v []*string) []string {
109109
res := make([]string, len(v))
110-
for i := range len(v) {
110+
for i := range v {
111111
res[i] = FromPtrValue(v[i])
112112
}
113113
return res
@@ -116,7 +116,7 @@ func FromPtrValues(v []*string) []string {
116116
// FromFloatPtrValues adapts a slice of float64 pointer fields for use as CurrentValues.
117117
func FromFloatPtrValues(v []*float64) []string {
118118
res := make([]string, len(v))
119-
for i := range len(v) {
119+
for i := range v {
120120
res[i] = FromFloatPtrValue(v[i])
121121
}
122122
return res
@@ -125,7 +125,7 @@ func FromFloatPtrValues(v []*float64) []string {
125125
// FromIntPtrValues adapts a slice of int64 pointer fields for use as CurrentValues.
126126
func FromIntPtrValues(v []*int64) []string {
127127
res := make([]string, len(v))
128-
for i := range len(v) {
128+
for i := range v {
129129
res[i] = FromIntPtrValue(v[i])
130130
}
131131
return res
@@ -138,7 +138,7 @@ func FromIntPtrValues(v []*int64) []string {
138138
// string pointers and need to be resolved as part of `ResolveMultiple`.
139139
func ToPtrValues(v []string) []*string {
140140
res := make([]*string, len(v))
141-
for i := range len(v) {
141+
for i := range v {
142142
res[i] = ToPtrValue(v[i])
143143
}
144144
return res
@@ -147,7 +147,7 @@ func ToPtrValues(v []string) []*string {
147147
// ToFloatPtrValues adapts ResolvedValues for use as a slice of float64 pointer fields.
148148
func ToFloatPtrValues(v []string) []*float64 {
149149
res := make([]*float64, len(v))
150-
for i := range len(v) {
150+
for i := range v {
151151
res[i] = ToFloatPtrValue(v[i])
152152
}
153153
return res
@@ -156,7 +156,7 @@ func ToFloatPtrValues(v []string) []*float64 {
156156
// ToIntPtrValues adapts ResolvedValues for use as a slice of int64 pointer fields.
157157
func ToIntPtrValues(v []string) []*int64 {
158158
res := make([]*int64, len(v))
159-
for i := range len(v) {
159+
for i := range v {
160160
res[i] = ToIntPtrValue(v[i])
161161
}
162162
return res

0 commit comments

Comments
 (0)