File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -116,8 +116,8 @@ func main() {
116
116
version .NewVersionCmd (),
117
117
)
118
118
119
- foundProject , version := getProjectVersion ()
120
- if foundProject && version == project .Version1 {
119
+ foundProject , projectVersion := getProjectVersion ()
120
+ if foundProject && projectVersion == project .Version1 {
121
121
printV1DeprecationWarning ()
122
122
123
123
rootCmd .AddCommand (
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ import (
22
22
"github.com/spf13/cobra"
23
23
)
24
24
25
+ // var needs to be used instead of const as ldflags is used to fill this
26
+ // information in the release process
25
27
var (
26
28
kubeBuilderVersion = "unknown"
27
29
kubernetesVendorVersion = "unknown"
@@ -41,7 +43,7 @@ type Version struct {
41
43
GoArch string `json:"goArch"`
42
44
}
43
45
44
- func GetVersion () Version {
46
+ func getVersion () Version {
45
47
return Version {
46
48
kubeBuilderVersion ,
47
49
kubernetesVendorVersion ,
@@ -67,5 +69,5 @@ func NewVersionCmd() *cobra.Command {
67
69
}
68
70
69
71
func runVersion (_ * cobra.Command , _ []string ) {
70
- GetVersion ().Print ()
72
+ getVersion ().Print ()
71
73
}
You can’t perform that action at this time.
0 commit comments