formatting update per gofmt

This commit is contained in:
Taylor Gerring 2014-11-15 20:21:03 -06:00
parent 71b338e8ac
commit 3588c4a9fe

View File

@ -32,7 +32,7 @@ func (self *JSRepl) read() {
if err != nil { if err != nil {
fmt.Println("Error reading input", err) fmt.Println("Error reading input", err)
} else { } else {
if (string(str) == "exit") { if string(str) == "exit" {
self.Stop() self.Stop()
break break
} else { } else {
@ -46,25 +46,25 @@ func addHistory(s string) {
} }
func printColored(outputVal string) { func printColored(outputVal string) {
for ; outputVal != "" ; { for outputVal != "" {
codePart := "" codePart := ""
if (strings.HasPrefix(outputVal, "\033[32m")) { if strings.HasPrefix(outputVal, "\033[32m") {
codePart = "\033[32m" codePart = "\033[32m"
changeColor(2) changeColor(2)
} }
if (strings.HasPrefix(outputVal, "\033[1m\033[30m")) { if strings.HasPrefix(outputVal, "\033[1m\033[30m") {
codePart = "\033[1m\033[30m" codePart = "\033[1m\033[30m"
changeColor(8) changeColor(8)
} }
if (strings.HasPrefix(outputVal, "\033[31m")) { if strings.HasPrefix(outputVal, "\033[31m") {
codePart = "\033[31m" codePart = "\033[31m"
changeColor(red) changeColor(red)
} }
if (strings.HasPrefix(outputVal, "\033[35m")) { if strings.HasPrefix(outputVal, "\033[35m") {
codePart = "\033[35m" codePart = "\033[35m"
changeColor(5) changeColor(5)
} }
if (strings.HasPrefix(outputVal, "\033[0m")) { if strings.HasPrefix(outputVal, "\033[0m") {
codePart = "\033[0m" codePart = "\033[0m"
resetColorful() resetColorful()
} }