Skip to content

Commit da77b46

Browse files
authored
Improved visibility in light mode (#112)
1 parent 1a50771 commit da77b46

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

main.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import (
1717
)
1818

1919
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()
2525
)
2626

2727
func main() {
@@ -31,14 +31,14 @@ func main() {
3131
flag.BoolVar(&debug, "debug", false, "Enable debug logs")
3232
flag.Usage = func() {
3333
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"))
3535
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"))
3737
fmt.Fprintf(color.Output, "%s\n", white(`
3838
protect: Protect local branches from deletion
3939
unprotect: Unprotect local branches
4040
`))
41-
fmt.Fprintf(color.Output, "%s\n", whiteBold("FLAGS"))
41+
fmt.Fprintf(color.Output, "%s\n", bold("FLAGS"))
4242
flag.PrintDefaults()
4343
fmt.Println()
4444
}
@@ -54,7 +54,7 @@ func main() {
5454
protectCmd := flag.NewFlagSet("protect", flag.ExitOnError)
5555
protectCmd.Usage = func() {
5656
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"))
5858
fmt.Fprintf(color.Output, " %s\n\n", white("gh poi protect <branchname>..."))
5959
}
6060
protectCmd.Parse(args)
@@ -64,7 +64,7 @@ func main() {
6464
unprotectCmd := flag.NewFlagSet("unprotect", flag.ExitOnError)
6565
unprotectCmd.Usage = func() {
6666
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"))
6868
fmt.Fprintf(color.Output, " %s\n\n", white("gh poi unprotect <branchname>..."))
6969
}
7070
unprotectCmd.Parse(args)
@@ -81,7 +81,7 @@ func runMain(dryRun bool, debug bool) {
8181
defer stop()
8282

8383
if dryRun {
84-
fmt.Fprintf(color.Output, "%s\n", whiteBold("== DRY RUN =="))
84+
fmt.Fprintf(color.Output, "%s\n", bold("== DRY RUN =="))
8585
}
8686

8787
connection := &conn.Connection{Debug: debug}
@@ -150,11 +150,11 @@ func runMain(dryRun bool, debug bool) {
150150
notDeletedStates = []shared.BranchState{shared.Deletable, shared.NotDeletable}
151151
}
152152

153-
fmt.Fprintf(color.Output, "%s\n", whiteBold("Deleted branches"))
153+
fmt.Fprintf(color.Output, "%s\n", bold("Deleted branches"))
154154
printBranches(getBranches(branches, deletedStates))
155155
fmt.Println()
156156

157-
fmt.Fprintf(color.Output, "%s\n", whiteBold("Branches not deleted"))
157+
fmt.Fprintf(color.Output, "%s\n", bold("Branches not deleted"))
158158
printBranches(getBranches(branches, notDeletedStates))
159159
fmt.Println()
160160
}

0 commit comments

Comments
 (0)