File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change
1
+ default : build
2
+
3
+ watch :
4
+ npx nodemon -e go --exec " go build -o main *.go || exit 1"
5
+
6
+ build :
7
+ go build -o main *.go
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package main
2
2
3
3
import (
4
4
"fmt"
5
+ math "math"
5
6
"os"
6
7
"os/exec"
7
8
"sort"
@@ -82,7 +83,7 @@ func main() {
82
83
fmt .Println ("" )
83
84
84
85
var count = 1
85
- for branchIndex , branch := range branches [:10 ] {
86
+ for branchIndex , branch := range branches [:int ( math . Min ( float64 ( len ( branches )), 10 )) ] {
86
87
s := timeago .Of (branch .commitedAt )
87
88
88
89
space := " "
Original file line number Diff line number Diff line change 7
7
"github.com/fatih/color"
8
8
)
9
9
10
- const Version string = "0.0.8 "
11
- const BuildDate string = "2022-04-02 "
10
+ const Version string = "0.0.10 "
11
+ const BuildDate string = "2022-06-09 "
12
12
13
13
func cliCommandDisplayVersion (args []string ) {
14
14
displayVersion := StringInSlice ("-v" , args [1 :]) || StringInSlice ("--version" , args [1 :])
@@ -19,7 +19,7 @@ func cliCommandDisplayVersion(args []string) {
19
19
fmt .Println (bold ("⚡️ Git branch" ))
20
20
fmt .Println ()
21
21
fmt .Println ("build date: " , bold (BuildDate ))
22
- fmt .Println ("version: " , bold (Version ))
22
+ fmt .Println ("version: " , bold (Version ))
23
23
fmt .Println ()
24
24
os .Exit (0 )
25
25
}
You can’t perform that action at this time.
0 commit comments