Skip to content

Commit a233dd0

Browse files
committed
Protect against potential panic
1 parent 76215d1 commit a233dd0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/configs/module_version_deprecations.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ func buildChildModuleDeprecations(modDeprecations []*ModuleVersionDeprecationInf
131131
modDeprecation = modDeprecation + fmt.Sprintf("\n\nLink for more information: %s", deprecation.RegistryDeprecation.Link)
132132
}
133133
modDeprecationStrings = append(modDeprecationStrings, modDeprecation)
134+
deprecationList = append(deprecationList, &ModuleVersionDeprecationDiagnosticExtraDeprecationItem{
135+
Version: deprecation.RegistryDeprecation.Version,
136+
SourceName: deprecation.SourceName,
137+
DeprecationMessage: deprecation.RegistryDeprecation.Message,
138+
Link: deprecation.RegistryDeprecation.Link,
139+
})
134140
}
135-
deprecationList = append(deprecationList, &ModuleVersionDeprecationDiagnosticExtraDeprecationItem{
136-
Version: deprecation.RegistryDeprecation.Version,
137-
SourceName: deprecation.SourceName,
138-
DeprecationMessage: deprecation.RegistryDeprecation.Message,
139-
Link: deprecation.RegistryDeprecation.Link,
140-
})
141141
newParentMods := append(parentMods, deprecation.SourceName)
142142
deprecationStrings, deprecationStructs := buildChildModuleDeprecations(deprecation.ExternalDependencies, newParentMods)
143143
modDeprecationStrings = append(modDeprecationStrings, deprecationStrings...)

0 commit comments

Comments
 (0)