FullVersion returns the display version string. Examples: "0.0.3", "0.0.3-abc1234", "0.0.3-abc1234*"
()
| 51 | // FullVersion returns the display version string. |
| 52 | // Examples: "0.0.3", "0.0.3-abc1234", "0.0.3-abc1234*" |
| 53 | func FullVersion() string { |
| 54 | v := Version |
| 55 | if GitCommit != "unknown" && GitCommit != "" { |
| 56 | short := GitCommit |
| 57 | if len(short) > 7 { |
| 58 | short = short[:7] |
| 59 | } |
| 60 | v += "-" + short |
| 61 | } |
| 62 | if GitDirty == "true" { |
| 63 | v += "*" |
| 64 | } |
| 65 | return v |
| 66 | } |
| 67 | |
| 68 | // Execute runs the root command |
| 69 | func Execute() error { |
no outgoing calls