Skip to content

Commit c9e85d6

Browse files
authored
Improve readability in light theme (#121) (#122)
1 parent 920a5e6 commit c9e85d6

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

main.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
)
1919

2020
var (
21-
white = color.New(color.FgWhite).SprintFunc()
2221
bold = color.New(color.Bold).SprintFunc()
2322
hiBlack = color.New(color.FgHiBlack).SprintFunc()
2423
green = color.New(color.FgGreen).SprintFunc()
@@ -31,14 +30,14 @@ func main() {
3130
flag.BoolVar(&dryRun, "dry-run", false, "Show branches to delete")
3231
flag.BoolVar(&debug, "debug", false, "Enable debug logs")
3332
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.")
3534
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]")
3736
fmt.Fprintf(color.Output, "%s", bold("COMMANDS"))
38-
fmt.Fprintf(color.Output, "%s\n", white(`
37+
fmt.Fprintf(color.Output, "%s\n", `
3938
protect: Protect local branches from deletion
4039
unprotect: Unprotect local branches
41-
`))
40+
`)
4241
fmt.Fprintf(color.Output, "%s\n", bold("FLAGS"))
4342
flag.PrintDefaults()
4443
fmt.Println()
@@ -54,19 +53,19 @@ func main() {
5453
case "protect":
5554
protectCmd := flag.NewFlagSet("protect", flag.ExitOnError)
5655
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.")
5857
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>...")
6059
}
6160
protectCmd.Parse(args)
6261

6362
runProtect(args, debug)
6463
case "unprotect":
6564
unprotectCmd := flag.NewFlagSet("unprotect", flag.ExitOnError)
6665
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.")
6867
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>...")
7069
}
7170
unprotectCmd.Parse(args)
7271

@@ -196,7 +195,7 @@ func printBranches(branches []shared.Branch) {
196195
if branch.Head {
197196
fmt.Fprintf(color.Output, "* %s", green(branch.Name))
198197
} else {
199-
fmt.Fprintf(color.Output, " %s", white(branch.Name))
198+
fmt.Fprintf(color.Output, " %s", branch.Name)
200199
}
201200
reason := ""
202201
if branch.IsProtected {
@@ -221,7 +220,7 @@ func printBranches(branches []shared.Branch) {
221220
fmt.Fprintf(color.Output, " %s %s %s %s\n",
222221
line,
223222
color.New(issueNoColor).SprintFunc()(number),
224-
white(pr.Url),
223+
pr.Url,
225224
hiBlack(pr.Author),
226225
)
227226
}

0 commit comments

Comments
 (0)