Fix code linting issue where a slice was created non-empty and appended-to (#19490)

This commit is contained in:
Martin Angers
2024-06-11 08:55:07 -04:00
committed by GitHub
parent 96c8139c02
commit dec9bc53e3
2 changed files with 2 additions and 1 deletions
@@ -0,0 +1 @@
* Fixed a code linter issue where a slice was created non-empty and appended-to, instead of empty with the required capacity.
+1 -1
View File
@@ -416,7 +416,7 @@ func updateMDMWindowsHostProfileStatusFromResponseDB(
WHERE host_uuid = ? AND command_uuid IN (?)`
// grab command UUIDs to find matching entries using `getMatchingHostProfilesStmt`
commandUUIDs := make([]string, len(payloads))
commandUUIDs := make([]string, 0, len(payloads))
// also grab the payloads keyed by the command uuid, so we can easily
// grab the corresponding `Detail` and `Status` from the matching
// command later on.