Skip to content

Commit

Permalink
lxd/db/images: Ignore prealloc for now
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
  • Loading branch information
tomponline committed Jan 21, 2025
1 parent f44bc47 commit 0a4e88f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lxd/db/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ SELECT nodes.address FROM nodes
WHERE images.fingerprint = ?
`
var localAddress string // Address of this node
var addresses []string // Addresses of online nodes with the image
var addresses []string // Addresses of online nodes with the image //nolint:prealloc

Check failure on line 531 in lxd/db/images.go

View workflow job for this annotation

GitHub Actions / Code

Consider pre-allocating `addresses` (prealloc)

offlineThreshold, err := c.GetNodeOfflineThreshold(ctx)
if err != nil {
Expand Down Expand Up @@ -1111,7 +1111,7 @@ SELECT DISTINCT nodes.address FROM nodes WHERE nodes.address NOT IN (
}

func (c *ClusterTx) getNodesByImageFingerprint(ctx context.Context, stmt string, fingerprint string, autoUpdate *bool) ([]string, error) {
var addresses []string // Addresses of online nodes with the image
var addresses []string // Addresses of online nodes with the image //nolint:prealloc

Check failure on line 1114 in lxd/db/images.go

View workflow job for this annotation

GitHub Actions / Code

Consider pre-allocating `addresses` (prealloc)

offlineThreshold, err := c.GetNodeOfflineThreshold(ctx)
if err != nil {
Expand Down

0 comments on commit 0a4e88f

Please sign in to comment.