Skip to content

Commit

Permalink
RHINENG-8141: resolve moving const/struct definitions to the top of t…
Browse files Browse the repository at this point in the history
…he file
  • Loading branch information
Dugowitch committed Aug 13, 2024
1 parent 307a064 commit de64f76
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions evaluator/evaluate_advisories.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ import (
"gorm.io/gorm/clause"
)

const (
undefinedChangeType int = iota
enhancement
bugfix
security
)

type extendedAdvisory struct {
change ChangeType
models.SystemAdvisories
}

type extendedAdvisoryMap map[string]extendedAdvisory

// LazySaveAndLoadAdvisories lazy saves missing advisories from reported, loads stored ones from DB,
// and evaluates changes between the two.
func lazySaveAndLoadAdvisories(system *models.SystemPlatform, vmaasData *vmaas.UpdatesV3Response) (
Expand Down Expand Up @@ -356,17 +370,3 @@ func updateAdvisoryAccountData(tx *gorm.DB, system *models.SystemPlatform, advis

return database.BulkInsert(txOnConflict, changes)
}

type extendedAdvisory struct {
change ChangeType
models.SystemAdvisories
}

type extendedAdvisoryMap map[string]extendedAdvisory

const (
undefinedChangeType int = iota
enhancement
bugfix
security
)

0 comments on commit de64f76

Please sign in to comment.