Skip to content

Commit 8e36026

Browse files
committed
fix(cockpit): fix lint
1 parent e64cb10 commit 8e36026

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

internal/services/cockpit/cockpit.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,15 @@ func ResourceCockpitCreate(ctx context.Context, d *schema.ResourceData, m interf
101101
return diag.FromErr(err)
102102
}
103103
}
104+
104105
d.SetId(projectID)
106+
105107
return ResourceCockpitRead(ctx, d, m)
106108
}
107109

108110
func ResourceCockpitRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
109111
var diags diag.Diagnostics
112+
110113
api, err := NewGlobalAPI(m)
111114
if err != nil {
112115
return diag.FromErr(err)
@@ -175,12 +178,10 @@ func ResourceCockpitRead(ctx context.Context, d *schema.ResourceData, m interfac
175178
_ = d.Set("push_url", createCockpitPushURLList(endpoints))
176179

177180
return diags
178-
179181
}
180182

181183
func ResourceCockpitUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
182184
diags := diag.Diagnostics{}
183-
184185
if d.HasChange("plan") {
185186
diags = append(diags, diag.Diagnostic{
186187
Severity: diag.Warning,
@@ -190,10 +191,12 @@ func ResourceCockpitUpdate(ctx context.Context, d *schema.ResourceData, m interf
190191
}
191192

192193
diags = append(diags, ResourceCockpitRead(ctx, d, m)...)
194+
193195
return diags
194196
}
195197

196198
func ResourceCockpitDelete(_ context.Context, d *schema.ResourceData, _ interface{}) diag.Diagnostics {
197199
d.SetId("")
200+
198201
return nil
199202
}

internal/services/cockpit/cockpit_data_source.go

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ func DataSourceCockpit() *schema.Resource {
3232
}
3333

3434
func dataSourceCockpitRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
35-
3635
projectID := d.Get("project_id").(string)
3736
if projectID == "" {
3837
_, err := getDefaultProjectID(ctx, m)

0 commit comments

Comments
 (0)