We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
--version
1 parent 5ebb953 commit 679d39eCopy full SHA for 679d39e
go/cmd/gh-ost/main.go
@@ -160,12 +160,15 @@ func main() {
160
flag.PrintDefaults()
161
return
162
}
163
+
164
+ if AppVersion == "" {
165
+ AppVersion = "unversioned"
166
+ }
167
+ if GitCommit == "" {
168
+ GitCommit = "unknown"
169
170
if *version {
- appVersion := AppVersion
- if appVersion == "" {
- appVersion = "unversioned"
- }
- fmt.Printf("%s (git commit: %s)", appVersion, GitCommit)
171
+ fmt.Printf("%s (git commit: %s)\n", AppVersion, GitCommit)
172
173
174
0 commit comments