Skip to content

Commit

Permalink
Added main test stub and required go command whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
d4l3k committed Apr 1, 2015
1 parent 882c329 commit 5060b25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package main

import (
"testing"
)

func TestBackupRestore(t *testing.T) {
}
4 changes: 3 additions & 1 deletion pry/highlighter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ const highlightColor5 = "red+b"
func Highlight(s string) string {
highlightSymbols := []string{"==", "!=", ":=", "="}
highlightKeywords := []string{
"for", "defer", "go", "func", "struct", "switch", "case",
"for", "defer", "func", "struct", "switch", "case",
"interface", "if", "range", "bool", "type", "package", "import",
"make", "append",
}
highlightKeywordsSpaced := []string{"go"}
highlightTypes := []string{
"byte",
"complex129",
Expand All @@ -43,6 +44,7 @@ func Highlight(s string) string {
}
s = HighlightWords(s, []string{"\\d+(.\\d+)?", "nil", "true", "false"}, highlightColor4, "\\W")
s = HighlightWords(s, highlightKeywords, highlightColor1, "\\W")
s = HighlightWords(s, highlightKeywordsSpaced, highlightColor1, "\\s")
s = HighlightWords(s, highlightTypes, highlightColor2, "\\W")
s = HighlightWords(s, highlightSymbols, highlightColor1, "")
s = HighlightWords(s, []string{".+"}, highlightColor3, "\"")
Expand Down

0 comments on commit 5060b25

Please sign in to comment.