mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-07 14:32:17 -04:00
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:
parent
0157537852
commit
fc33a74c78
24 changed files with 43 additions and 43 deletions
|
@ -182,5 +182,10 @@ const (
|
|||
CDNAPIPrefix = "constellation/v1"
|
||||
)
|
||||
|
||||
// VersionInfo is the version of a binary. Left as a separate variable to allow override during build.
|
||||
var VersionInfo = "0.0.0"
|
||||
// VersionInfo returns the version of a binary.
|
||||
func VersionInfo() string {
|
||||
return versionInfo
|
||||
}
|
||||
|
||||
// versionInfo is the version of a binary. Left as a separate variable to allow override during build.
|
||||
var versionInfo = "0.0.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue