Skip to content

Commit 116a930

Browse files
committed
style(azure database): satisfy godot, fieldalignment, and unused linters
Add trailing periods to four exported comments (godot), reorder the mock pager struct fields so the pointer-scannable region shrinks to 24 bytes (govet fieldalignment), and drop the unused boolPtr test helper (unused). No behavior change; 703 azure-module tests pass.
1 parent 5e0c25a commit 116a930

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎providers/azure/services/database/client.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ type CapabilitiesClient interface {
6262
ListByLocation(ctx context.Context, locationName string, options *armsql.CapabilitiesClientListByLocationOptions) (armsql.CapabilitiesClientListByLocationResponse, error)
6363
}
6464

65-
// SQLServersPager interface for listing SQL servers (enables mocking)
65+
// SQLServersPager interface for listing SQL servers (enables mocking).
6666
type SQLServersPager interface {
6767
More() bool
6868
NextPage(ctx context.Context) (armsql.ServersClientListResponse, error)
6969
}
7070

71-
// SQLManagedInstancesPager interface for listing SQL managed instances (enables mocking)
71+
// SQLManagedInstancesPager interface for listing SQL managed instances (enables mocking).
7272
type SQLManagedInstancesPager interface {
7373
More() bool
7474
NextPage(ctx context.Context) (armsql.ManagedInstancesClientListResponse, error)
@@ -138,12 +138,12 @@ func (c *DatabaseClient) SetCapabilitiesClient(client CapabilitiesClient) {
138138
c.capabilitiesClient = client
139139
}
140140

141-
// SetServersPager sets the SQL servers pager (for testing)
141+
// SetServersPager sets the SQL servers pager (for testing).
142142
func (c *DatabaseClient) SetServersPager(pager SQLServersPager) {
143143
c.serversPager = pager
144144
}
145145

146-
// SetManagedInstancesPager sets the SQL managed instances pager (for testing)
146+
// SetManagedInstancesPager sets the SQL managed instances pager (for testing).
147147
func (c *DatabaseClient) SetManagedInstancesPager(pager SQLManagedInstancesPager) {
148148
c.managedInstancesPager = pager
149149
}

‎providers/azure/services/database/client_test.go‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,9 +1250,9 @@ func TestDatabaseClient_PurchaseCommitment_DisplayNameConformsToAzureAllowlist(t
12501250
// MockSQLServersPager mocks the SQLServersPager interface.
12511251
// CallCount tracks how many times NextPage was invoked.
12521252
type MockSQLServersPager struct {
1253+
err error
12531254
pages []armsql.ServersClientListResponse
12541255
index int
1255-
err error
12561256
CallCount int
12571257
}
12581258

@@ -1276,9 +1276,9 @@ func (m *MockSQLServersPager) NextPage(_ context.Context) (armsql.ServersClientL
12761276
// MockSQLManagedInstancesPager mocks the SQLManagedInstancesPager interface.
12771277
// CallCount tracks how many times NextPage was invoked.
12781278
type MockSQLManagedInstancesPager struct {
1279+
err error
12791280
pages []armsql.ManagedInstancesClientListResponse
12801281
index int
1281-
err error
12821282
CallCount int
12831283
}
12841284

@@ -1299,8 +1299,6 @@ func (m *MockSQLManagedInstancesPager) NextPage(_ context.Context) (armsql.Manag
12991299
return page, nil
13001300
}
13011301

1302-
func boolPtr(b bool) *bool { return &b }
1303-
13041302
// buildMIPage builds a single-page managed-instances response with the
13051303
// given ZoneRedundant values.
13061304
func buildMIPage(zoneRedundant ...bool) armsql.ManagedInstancesClientListResponse {

0 commit comments

Comments
 (0)