@@ -18,7 +18,6 @@ import (
18
18
)
19
19
20
20
var (
21
- white = color .New (color .FgWhite ).SprintFunc ()
22
21
bold = color .New (color .Bold ).SprintFunc ()
23
22
hiBlack = color .New (color .FgHiBlack ).SprintFunc ()
24
23
green = color .New (color .FgGreen ).SprintFunc ()
@@ -31,14 +30,14 @@ func main() {
31
30
flag .BoolVar (& dryRun , "dry-run" , false , "Show branches to delete" )
32
31
flag .BoolVar (& debug , "debug" , false , "Enable debug logs" )
33
32
flag .Usage = func () {
34
- fmt .Fprintf (color .Output , "%s\n \n " , white ( "Delete the merged local branches." ) )
33
+ fmt .Fprintf (color .Output , "%s\n \n " , "Delete the merged local branches." )
35
34
fmt .Fprintf (color .Output , "%s\n " , bold ("USAGE" ))
36
- fmt .Fprintf (color .Output , " %s\n \n " , white ( "gh poi <command> [flags]" ) )
35
+ fmt .Fprintf (color .Output , " %s\n \n " , "gh poi <command> [flags]" )
37
36
fmt .Fprintf (color .Output , "%s" , bold ("COMMANDS" ))
38
- fmt .Fprintf (color .Output , "%s\n " , white ( `
37
+ fmt .Fprintf (color .Output , "%s\n " , `
39
38
protect: Protect local branches from deletion
40
39
unprotect: Unprotect local branches
41
- ` ))
40
+ ` )
42
41
fmt .Fprintf (color .Output , "%s\n " , bold ("FLAGS" ))
43
42
flag .PrintDefaults ()
44
43
fmt .Println ()
@@ -54,19 +53,19 @@ func main() {
54
53
case "protect" :
55
54
protectCmd := flag .NewFlagSet ("protect" , flag .ExitOnError )
56
55
protectCmd .Usage = func () {
57
- fmt .Fprintf (color .Output , "%s\n \n " , white ( "Protect local branches from deletion." ) )
56
+ fmt .Fprintf (color .Output , "%s\n \n " , "Protect local branches from deletion." )
58
57
fmt .Fprintf (color .Output , "%s\n " , bold ("USAGE" ))
59
- fmt .Fprintf (color .Output , " %s\n \n " , white ( "gh poi protect <branchname>..." ) )
58
+ fmt .Fprintf (color .Output , " %s\n \n " , "gh poi protect <branchname>..." )
60
59
}
61
60
protectCmd .Parse (args )
62
61
63
62
runProtect (args , debug )
64
63
case "unprotect" :
65
64
unprotectCmd := flag .NewFlagSet ("unprotect" , flag .ExitOnError )
66
65
unprotectCmd .Usage = func () {
67
- fmt .Fprintf (color .Output , "%s\n \n " , white ( "Unprotect local branches." ) )
66
+ fmt .Fprintf (color .Output , "%s\n \n " , "Unprotect local branches." )
68
67
fmt .Fprintf (color .Output , "%s\n " , bold ("USAGE" ))
69
- fmt .Fprintf (color .Output , " %s\n \n " , white ( "gh poi unprotect <branchname>..." ) )
68
+ fmt .Fprintf (color .Output , " %s\n \n " , "gh poi unprotect <branchname>..." )
70
69
}
71
70
unprotectCmd .Parse (args )
72
71
@@ -196,7 +195,7 @@ func printBranches(branches []shared.Branch) {
196
195
if branch .Head {
197
196
fmt .Fprintf (color .Output , "* %s" , green (branch .Name ))
198
197
} else {
199
- fmt .Fprintf (color .Output , " %s" , white ( branch .Name ) )
198
+ fmt .Fprintf (color .Output , " %s" , branch .Name )
200
199
}
201
200
reason := ""
202
201
if branch .IsProtected {
@@ -221,7 +220,7 @@ func printBranches(branches []shared.Branch) {
221
220
fmt .Fprintf (color .Output , " %s %s %s %s\n " ,
222
221
line ,
223
222
color .New (issueNoColor ).SprintFunc ()(number ),
224
- white ( pr .Url ) ,
223
+ pr .Url ,
225
224
hiBlack (pr .Author ),
226
225
)
227
226
}
0 commit comments