constants: make VersionInfo readonly (#1316)

The variable VersionInfo is supposed to be set by `go build -X ...` during link time but should not be modified at runtime.
This change ensures the underlying var is private and can only be accessed by a public getter.
This commit is contained in:
Malte Poll 2023-03-01 11:55:12 +01:00 committed by GitHub
parent 0157537852
commit fc33a74c78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 43 additions and 43 deletions

View file

@ -283,7 +283,7 @@ func (i *ChartLoader) loadOperators() (helm.Release, error) {
return helm.Release{}, fmt.Errorf("loading operators chart: %w", err)
}
updateVersions(chart, compatibility.EnsurePrefixV(constants.VersionInfo))
updateVersions(chart, compatibility.EnsurePrefixV(constants.VersionInfo()))
values, err := i.loadOperatorsValues()
if err != nil {
@ -370,7 +370,7 @@ func (i *ChartLoader) loadConstellationServices() (helm.Release, error) {
return helm.Release{}, fmt.Errorf("loading constellation-services chart: %w", err)
}
updateVersions(chart, compatibility.EnsurePrefixV(constants.VersionInfo))
updateVersions(chart, compatibility.EnsurePrefixV(constants.VersionInfo()))
values, err := i.loadConstellationServicesValues()
if err != nil {