File tree Expand file tree Collapse file tree 3 files changed +1
-39
lines changed Expand file tree Collapse file tree 3 files changed +1
-39
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ func printVersion() {
140
140
}
141
141
142
142
func printVersionOnly () {
143
- version0 := GetVersion1 ()
143
+ version0 := GetVersion ()
144
144
fmt .Println (version0 )
145
145
os .Exit (0 )
146
146
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,30 +3,12 @@ package main
3
3
import (
4
4
_ "embed"
5
5
"runtime/debug"
6
- "strings"
7
6
)
8
7
9
8
const (
10
9
dev = "dev"
11
10
)
12
11
13
- // GetVersion1 - return numeric version like 1.0.2 or dev
14
- func GetVersion1 () string {
15
- version0 := GetVersion ()
16
- if version0 == dev {
17
- return dev
18
- }
19
-
20
- l0 := len (version0 )
21
- in0 := strings .Index (version0 , "v" )
22
- if in0 == - 1 || in0 >= l0 {
23
- return version0
24
- }
25
-
26
- in1 := in0 + 1
27
- return version0 [in1 :]
28
- }
29
-
30
12
func GetVersion0 () (string , string ) {
31
13
version0 := GetVersion ()
32
14
gitHash := GetGitHash ()
You can’t perform that action at this time.
0 commit comments