Skip to content

Commit

Permalink
remove unexpected blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
hervenicol committed Jan 6, 2025
1 parent 6f782db commit 92c0cfb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions internal/controller/dashboard_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func (r *DashboardReconciler) Reconcile(ctx context.Context, req ctrl.Request) (

// SetupWithManager sets up the controller with the Manager.
func (r *DashboardReconciler) SetupWithManager(mgr ctrl.Manager) error {

labelSelectorPredicate, err := predicate.LabelSelectorPredicate(metav1.LabelSelector{MatchLabels: map[string]string{DashboardSelectorLabelName: DashboardSelectorLabelValue}})
if err != nil {
return errors.WithStack(err)
Expand Down Expand Up @@ -186,7 +185,6 @@ func (r DashboardReconciler) reconcileCreate(ctx context.Context, dashboard *v1.
}

func getDashboardUID(dashboard map[string]interface{}) (string, error) {

UID, ok := dashboard["uid"].(string)
if !ok {
return "", errors.New("dashboard UID not found in configmap")
Expand All @@ -195,7 +193,6 @@ func getDashboardUID(dashboard map[string]interface{}) (string, error) {
}

func getDashboardCMOrg(dashboard *v1.ConfigMap) (string, error) {

// Try to look for an annotation first
annotations := dashboard.GetAnnotations()
if annotations != nil && annotations[organization.OrganizationLabel] != "" {
Expand Down Expand Up @@ -240,7 +237,6 @@ func (r DashboardReconciler) configureDashboard(ctx context.Context, dashboardCM
}

for _, dashboardString := range dashboardCM.Data {

var dashboard map[string]any
err = json.Unmarshal([]byte(dashboardString), &dashboard)
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions internal/controller/dashboard_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import (

var _ = Describe("Dashboard Controller", func() {
Context("When reconciling a resource", func() {

It("should successfully reconcile the resource", func() {

// TODO(user): Add more specific assertions depending on your controller's reconciliation logic.
// Example: If you expect a certain status condition after reconciliation, verify it here.
})
Expand Down

0 comments on commit 92c0cfb

Please sign in to comment.