internal/frontend/versions.go: minor cleanup
Move some field assignments into struct literals.
For golang/go#48223
Trust: Jonathan Amsterdam
Run-TryBot: Jonathan Amsterdam
@@ -176,17 +176,17 @@ func buildVersionDetails(currentModulePath string,
ModulePath: mi.ModulePath,
Major: major,
Incompatible: version.IsIncompatible(mi.Version),
+ Deprecated: mi.Deprecated,
+ DeprecationComment: shortRationale(mi.DeprecationComment),
}
vs := &VersionSummary{
Link: linkify(mi),
CommitTime: absoluteTime(mi.CommitTime),
Version: linkVersion(mi.ModulePath, mi.Version, mi.Version),
IsMinor: isMinor(mi.Version),
+ Retracted: mi.Retracted,
+ RetractionRationale: shortRationale(mi.RetractionRationale),
}
- key.Deprecated = mi.Deprecated
- key.DeprecationComment = shortRationale(mi.DeprecationComment)
- vs.Retracted = mi.Retracted
- vs.RetractionRationale = shortRationale(mi.RetractionRationale)
if sv := sh.SymbolsAtVersion(mi.Version); sv != nil {
vs.Symbols = symbolsForVersion(linkify(mi), sv)
}
