@@ -17,11 +17,11 @@ import (
17
17
)
18
18
19
19
var (
20
- white = color .New (color .FgWhite ).SprintFunc ()
21
- whiteBold = color .New (color . FgWhite , color .Bold ).SprintFunc ()
22
- hiBlack = color .New (color .FgHiBlack ).SprintFunc ()
23
- green = color .New (color .FgGreen ).SprintFunc ()
24
- red = color .New (color .FgRed ).SprintFunc ()
20
+ white = color .New (color .FgWhite ).SprintFunc ()
21
+ bold = color .New (color .Bold ).SprintFunc ()
22
+ hiBlack = color .New (color .FgHiBlack ).SprintFunc ()
23
+ green = color .New (color .FgGreen ).SprintFunc ()
24
+ red = color .New (color .FgRed ).SprintFunc ()
25
25
)
26
26
27
27
func main () {
@@ -31,14 +31,14 @@ func main() {
31
31
flag .BoolVar (& debug , "debug" , false , "Enable debug logs" )
32
32
flag .Usage = func () {
33
33
fmt .Fprintf (color .Output , "%s\n \n " , white ("Delete the merged local branches." ))
34
- fmt .Fprintf (color .Output , "%s\n " , whiteBold ("USAGE" ))
34
+ fmt .Fprintf (color .Output , "%s\n " , bold ("USAGE" ))
35
35
fmt .Fprintf (color .Output , " %s\n \n " , white ("gh poi <command> [flags]" ))
36
- fmt .Fprintf (color .Output , "%s" , whiteBold ("COMMANDS" ))
36
+ fmt .Fprintf (color .Output , "%s" , bold ("COMMANDS" ))
37
37
fmt .Fprintf (color .Output , "%s\n " , white (`
38
38
protect: Protect local branches from deletion
39
39
unprotect: Unprotect local branches
40
40
` ))
41
- fmt .Fprintf (color .Output , "%s\n " , whiteBold ("FLAGS" ))
41
+ fmt .Fprintf (color .Output , "%s\n " , bold ("FLAGS" ))
42
42
flag .PrintDefaults ()
43
43
fmt .Println ()
44
44
}
@@ -54,7 +54,7 @@ func main() {
54
54
protectCmd := flag .NewFlagSet ("protect" , flag .ExitOnError )
55
55
protectCmd .Usage = func () {
56
56
fmt .Fprintf (color .Output , "%s\n \n " , white ("Protect local branches from deletion." ))
57
- fmt .Fprintf (color .Output , "%s\n " , whiteBold ("USAGE" ))
57
+ fmt .Fprintf (color .Output , "%s\n " , bold ("USAGE" ))
58
58
fmt .Fprintf (color .Output , " %s\n \n " , white ("gh poi protect <branchname>..." ))
59
59
}
60
60
protectCmd .Parse (args )
@@ -64,7 +64,7 @@ func main() {
64
64
unprotectCmd := flag .NewFlagSet ("unprotect" , flag .ExitOnError )
65
65
unprotectCmd .Usage = func () {
66
66
fmt .Fprintf (color .Output , "%s\n \n " , white ("Unprotect local branches." ))
67
- fmt .Fprintf (color .Output , "%s\n " , whiteBold ("USAGE" ))
67
+ fmt .Fprintf (color .Output , "%s\n " , bold ("USAGE" ))
68
68
fmt .Fprintf (color .Output , " %s\n \n " , white ("gh poi unprotect <branchname>..." ))
69
69
}
70
70
unprotectCmd .Parse (args )
@@ -81,7 +81,7 @@ func runMain(dryRun bool, debug bool) {
81
81
defer stop ()
82
82
83
83
if dryRun {
84
- fmt .Fprintf (color .Output , "%s\n " , whiteBold ("== DRY RUN ==" ))
84
+ fmt .Fprintf (color .Output , "%s\n " , bold ("== DRY RUN ==" ))
85
85
}
86
86
87
87
connection := & conn.Connection {Debug : debug }
@@ -150,11 +150,11 @@ func runMain(dryRun bool, debug bool) {
150
150
notDeletedStates = []shared.BranchState {shared .Deletable , shared .NotDeletable }
151
151
}
152
152
153
- fmt .Fprintf (color .Output , "%s\n " , whiteBold ("Deleted branches" ))
153
+ fmt .Fprintf (color .Output , "%s\n " , bold ("Deleted branches" ))
154
154
printBranches (getBranches (branches , deletedStates ))
155
155
fmt .Println ()
156
156
157
- fmt .Fprintf (color .Output , "%s\n " , whiteBold ("Branches not deleted" ))
157
+ fmt .Fprintf (color .Output , "%s\n " , bold ("Branches not deleted" ))
158
158
printBranches (getBranches (branches , notDeletedStates ))
159
159
fmt .Println ()
160
160
}
0 commit comments