Skip to content

Commit

Permalink
Fix irregular output format
Browse files Browse the repository at this point in the history
  • Loading branch information
tdh8316 committed Dec 30, 2019
1 parent 9a7b40c commit 9433e2f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions investigo.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func initializeSiteData(forceUpdate bool) {
fmt.Fprintf(
color.Output,
"[%s] Cannot open database \"%s\"\n",
color.HiRedString("!"), color.HiBlueString(dataFileName),
color.HiRedString("!"), (dataFileName),
)
}
}
Expand All @@ -211,8 +211,8 @@ func initializeSiteData(forceUpdate bool) {
} else {
fmt.Fprintf(
color.Output,
"%s Update database: %s",
color.HiBlueString("[!]"),
"[%s] Update database: %s",
color.HiBlueString("!"),
color.HiYellowString("Downloading..."),
)
}
Expand Down Expand Up @@ -250,7 +250,11 @@ func initializeSiteData(forceUpdate bool) {
_updateFile.Close()
jsonFile, _ = os.Open(dataFileName)

fmt.Println(" [Done]")
if options.noColor {
fmt.Println(" [Done]")
} else {
fmt.Fprintf(color.Output, " [%s]\n", color.GreenString("Done"))
}
}

defer jsonFile.Close()
Expand Down

0 comments on commit 9433e2f

Please sign in to comment.