Skip to content

Commit 46944cc

Browse files
committed
fix: apply gofmt formatting fixes
- Fix formatting issues in resource_cloudstack_network.go - Fix formatting issues in resource_cloudstack_instance.go - Ensures CI formatting checks pass without changing functionality
1 parent 5d0d647 commit 46944cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cloudstack/resource_cloudstack_instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func resourceCloudStackInstance() *schema.Resource {
153153
ForceNew: true,
154154
},
155155

156-
"keypair": &schema.Schema{
156+
"keypair": {
157157
Type: schema.TypeString,
158158
Optional: true,
159159
ConflictsWith: []string{"keypairs"},

cloudstack/resource_cloudstack_network.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,17 +177,17 @@ func resourceCloudStackNetwork() *schema.Resource {
177177
func resourceCloudStackNetworkCustomizeDiff(ctx context.Context, d *schema.ResourceDiff, meta interface{}) error {
178178
networkType := d.Get("type").(string)
179179
cidr := d.Get("cidr").(string)
180-
180+
181181
// For L3 networks, cidr is required
182182
if networkType == "L3" && cidr == "" {
183183
return fmt.Errorf("cidr is required when type is L3")
184184
}
185-
185+
186186
// For L2 networks, cidr should not be provided
187187
if networkType == "L2" && cidr != "" {
188188
return fmt.Errorf("cidr should not be provided when type is L2")
189189
}
190-
190+
191191
return nil
192192
}
193193

@@ -346,7 +346,7 @@ func resourceCloudStackNetworkRead(d *schema.ResourceData, meta interface{}) err
346346
d.Set("gateway", n.Gateway)
347347
d.Set("network_domain", n.Networkdomain)
348348
d.Set("vpc_id", n.Vpcid)
349-
349+
350350
// Determine network type based on CIDR presence
351351
if n.Cidr == "" {
352352
d.Set("type", "L2")

0 commit comments

Comments
 (0)