Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
iansltx committed Jan 5, 2025
1 parent 9b6e710 commit 97f3ec8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/datastore/mysql/software_titles.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (ds *Datastore) ListSoftwareTitles(
for _, p := range policies {
if i, ok := titleIndex[p.TitleID]; ok {
if softwareList[i].AppStoreApp != nil {
softwareList[i].AppStoreApp.AutomaticInstallPolicies = append(softwareList[i].SoftwarePackage.AutomaticInstallPolicies, p)
softwareList[i].AppStoreApp.AutomaticInstallPolicies = append(softwareList[i].AppStoreApp.AutomaticInstallPolicies, p)
} else {
softwareList[i].SoftwarePackage.AutomaticInstallPolicies = append(softwareList[i].SoftwarePackage.AutomaticInstallPolicies, p)
}
Expand Down Expand Up @@ -384,11 +384,11 @@ GROUP BY st.id, package_self_service, package_name, package_version, package_url
}

if opt.Platform != "" {
platforms := strings.Split(strings.Replace(opt.Platform, "macos", "darwin", -1), ",")
platforms := strings.Split(strings.ReplaceAll(opt.Platform, "macos", "darwin"), ",")
platformPlaceholders := strings.TrimSuffix(strings.Repeat("?,", len(platforms)), ",")

additionalWhere += fmt.Sprintf(` AND (si.platform IN (%s) OR vap.platform IN (%s))`, platformPlaceholders, platformPlaceholders)
slices.Grow(args, len(platformPlaceholders)*2)
args = slices.Grow(args, len(platformPlaceholders)*2)
for _, platform := range platforms { // for software installers
args = append(args, platform)
}
Expand Down

0 comments on commit 97f3ec8

Please sign in to comment.