Skip to content

Commit 1a49843

Browse files
committed
Formats go code
1 parent 5ae7327 commit 1a49843

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

pkg/patterns/addon/patch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func ApplyPatches(ctx context.Context, object declarative.DeclarativeObject, obj
5050
Object: m,
5151
})
5252
}
53-
} else if p, ok := object.(addonsv1alpha1.Patchable); ok{
53+
} else if p, ok := object.(addonsv1alpha1.Patchable); ok {
5454
for _, p := range p.PatchSpec().Patches {
5555
// Object is nil, Raw is populated (with json, even when input was yaml)
5656
r := bytes.NewReader(p.Raw)

pkg/patterns/addon/pkg/loaders/fs.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,20 @@ func (c *ManifestLoader) ResolveManifest(ctx context.Context, object runtime.Obj
5555
log := log.Log
5656

5757
var (
58-
channelName string
59-
version string
58+
channelName string
59+
version string
6060
componentName string
6161
)
6262

6363
unstruct, ok := object.(*unstructured.Unstructured)
6464
if ok {
65-
v, _, err := unstructured.NestedString(unstruct.Object, "spec", "version")
65+
v, _, err := unstructured.NestedString(unstruct.Object, "spec", "version")
6666
if err != nil {
6767
return nil, fmt.Errorf("unable to get spec.version: %v", err)
6868
}
6969
version = v
7070

71-
c, _, err := unstructured.NestedString(unstruct.Object, "spec", "channel")
71+
c, _, err := unstructured.NestedString(unstruct.Object, "spec", "channel")
7272
if err != nil {
7373
return nil, fmt.Errorf("unable to get spec.version: %v", err)
7474
}

pkg/patterns/addon/pkg/status/aggregate.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ func (a *aggregator) Reconciled(ctx context.Context, src declarative.Declarative
6363
log.WithValues("type", gk).V(2).Info("type not implemented for status aggregation, skipping")
6464
}
6565

66-
6766
statusHealthy = statusHealthy && healthy
6867
if err != nil {
6968
statusErrors = append(statusErrors, fmt.Sprintf("%v", err))
@@ -78,7 +77,7 @@ func (a *aggregator) Reconciled(ctx context.Context, src declarative.Declarative
7877
unstructStatus := make(map[string]interface{})
7978
var status addonv1alpha1.CommonStatus
8079

81-
if ok{
80+
if ok {
8281
unstructStatus["Healthy"] = true
8382
} else if commonOkay {
8483
status = addonv1alpha1.CommonStatus{Healthy: true}
@@ -132,8 +131,6 @@ func (a *aggregator) Reconciled(ctx context.Context, src declarative.Declarative
132131
}
133132
}
134133

135-
136-
137134
return nil
138135
}
139136

0 commit comments

Comments
 (0)