Skip to content

Commit a5402bf

Browse files
committed
style: apply go fmt to billing commands
- Add trailing newlines to files - Fix struct field alignment in resourceInfo - Fix string concatenation spacing
1 parent ba0bac4 commit a5402bf

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

internal/commands/billing/billing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ type billingCommand struct {
1616
// InitCommand implements Command.InitCommand
1717
func (b *billingCommand) InitCommand() {
1818
b.Cobra().Aliases = []string{"bill"}
19-
}
19+
}

internal/commands/billing/list.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ type listCommand struct {
3434

3535
// resourceInfo holds resource information
3636
type resourceInfo struct {
37-
Type string
38-
UUID string
39-
Name string
40-
Amount float64
41-
Hours int
42-
Currency string
37+
Type string
38+
UUID string
39+
Name string
40+
Amount float64
41+
Hours int
42+
Currency string
4343
}
4444

4545
// InitCommand implements commands.Command
@@ -75,7 +75,7 @@ func (c *listCommand) ExecuteWithoutArguments(exec commands.Executor) (output.Ou
7575
}
7676

7777
// Fetch resource names
78-
exec.PushProgressUpdateMessage(msg, msg + " (fetching resource names)")
78+
exec.PushProgressUpdateMessage(msg, msg+" (fetching resource names)")
7979

8080
// Get all servers
8181
servers, err := exec.Server().GetServers(exec.Context())
@@ -368,4 +368,4 @@ func (c *listCommand) buildOutput(resources []resourceInfo, totalAmount float64,
368368
// MaximumExecutions implements commands.Command
369369
func (c *listCommand) MaximumExecutions() int {
370370
return 1
371-
}
371+
}

internal/commands/billing/period.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,4 @@ func parsePeriod(period string) (string, string, error) {
152152
}
153153

154154
return "", "", fmt.Errorf("unknown period format: %s. Use formats like 'month', 'day', 'quarter', 'year', '3days', '2months', 'last month', or 'YYYY-MM'", period)
155-
}
155+
}

internal/commands/billing/summary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,4 +296,4 @@ func buildDetailedOutput(summary *upcloud.BillingSummary, month string) output.O
296296
// MaximumExecutions implements commands.Command
297297
func (c *summaryCommand) MaximumExecutions() int {
298298
return 1
299-
}
299+
}

0 commit comments

Comments
 (0)