Skip to content

Commit 79e7f41

Browse files
authored
gofmt 1.20 updates (style-only changes) (#110)
Signed-off-by: Jay Pipes <[email protected]> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 3b2bc34 commit 79e7f41

File tree

7 files changed

+34
-32
lines changed

7 files changed

+34
-32
lines changed

apis/core/v1alpha1/identifiers.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ type ResourceFieldSelector struct {
5656
// type to provide more user friendly syntax for references using 'from' field
5757
// Ex:
5858
// APIIDRef:
59-
// from:
60-
// name: my-api
59+
//
60+
// from:
61+
// name: my-api
6162
type AWSResourceReferenceWrapper struct {
6263
From *AWSResourceReference `json:"from,omitempty"`
6364
}

apis/core/v1alpha1/secret.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ type SecretKeyReference struct {
2424
k8scorev1.SecretReference `json:""`
2525
// Key is the key within the secret
2626
Key string `json:"key"`
27-
}
27+
}

pkg/compare/delta.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,17 @@ func (d *Delta) DifferentAt(subject string) bool {
4343
//
4444
// For example, consider this code:
4545
//
46-
// if delta.DifferentAt("Spec.Tags") {
47-
// if err = rm.SyncTags(ctx, desired, latest); err != nil {
48-
// return nil, err
49-
// }
50-
// }
51-
// if !delta.DifferentExcept("Spec.Tags") {
52-
// // We don't want to proceed to call the ModifyDBInstance API since
53-
// // no other resource fields have changed.
54-
// return desired, nil
55-
// }
46+
// if delta.DifferentAt("Spec.Tags") {
47+
// if err = rm.SyncTags(ctx, desired, latest); err != nil {
48+
// return nil, err
49+
// }
50+
// }
51+
//
52+
// if !delta.DifferentExcept("Spec.Tags") {
53+
// // We don't want to proceed to call the ModifyDBInstance API since
54+
// // no other resource fields have changed.
55+
// return desired, nil
56+
// }
5657
//
5758
// might be placed in an sdk_update_pre_build_request custom code hook to
5859
// prevent the ModifyDBInstance call from being executed if the DBInstance's

pkg/compare/nil_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ func TestNilDifference(t *testing.T) {
4343
require.True(compare.HasNilDifference(nullChan, nonNullChan))
4444

4545
}
46-

pkg/compare/path.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,15 @@ func (p Path) Pop() {
5151
}
5252
}
5353

54-
// Contains returns true if the supplied string, delimited on ".", matches
55-
// p.parts up to the length of the supplied string.
56-
// e.g. if the Path p represents "A.B":
57-
// subject "A" -> true
58-
// subject "A.B" -> true
59-
// subject "A.B.C" -> false
60-
// subject "B" -> false
61-
// subject "A.C" -> false
54+
// Contains returns true if the supplied string, delimited on ".", matches
55+
// p.parts up to the length of the supplied string.
56+
//
57+
// e.g. if the Path p represents "A.B":
58+
// subject "A" -> true
59+
// subject "A.B" -> true
60+
// subject "A.B.C" -> false
61+
// subject "B" -> false
62+
// subject "A.C" -> false
6263
func (p Path) Contains(subject string) bool {
6364
subjectSplit := strings.Split(subject, ".")
6465

pkg/condition/condition_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func TestConditionGetters(t *testing.T) {
9898
assert.Equal(len(gotAll), 2)
9999

100100
conds = append(conds, &ackv1alpha1.Condition{
101-
Type: ackv1alpha1.ConditionTypeReferencesResolved,
101+
Type: ackv1alpha1.ConditionTypeReferencesResolved,
102102
Status: corev1.ConditionTrue,
103103
})
104104
r = &ackmocks.AWSResource{}

pkg/runtime/reconciler.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,15 +1085,15 @@ func (r *resourceReconciler) getEndpointURL(
10851085
// getResyncPeriod returns the period of the recurring reconciler process which ensures the desired
10861086
// state of custom resources is maintained.
10871087
// It attempts to retrieve the duration from the following sources, in this order:
1088-
// 1. A resource-specific reconciliation resync period specified in the reconciliation resync
1089-
// configuration map (--reconcile-default-resync-seconds).
1090-
// 2. A resource-specific requeue on success period specified by the resource manager factory.
1091-
// The resource manager factory is controller-specific, and thus this period is to specified
1092-
// by controller authors (using ack-generate).
1093-
// 3. The default reconciliation resync period period specified in the controller binary flags.
1094-
// (--reconcile-resource-resync-seconds)
1095-
// 4. The default resync period defined in the ACK runtime package. Defined in defaultResyncPeriod
1096-
// within the same file
1088+
// 1. A resource-specific reconciliation resync period specified in the reconciliation resync
1089+
// configuration map (--reconcile-default-resync-seconds).
1090+
// 2. A resource-specific requeue on success period specified by the resource manager factory.
1091+
// The resource manager factory is controller-specific, and thus this period is to specified
1092+
// by controller authors (using ack-generate).
1093+
// 3. The default reconciliation resync period period specified in the controller binary flags.
1094+
// (--reconcile-resource-resync-seconds)
1095+
// 4. The default resync period defined in the ACK runtime package. Defined in defaultResyncPeriod
1096+
// within the same file
10971097
//
10981098
// Each reconciler has a unique value to use. This function should only be called during the
10991099
// instantiation of an AWSResourceReconciler and should not be called during the reconciliation

0 commit comments

Comments
 (0)