8
8
"sort"
9
9
"strings"
10
10
11
+ "github.com/fatih/color"
11
12
"github.com/pkg/errors"
12
13
13
14
"github.com/tj/mmake/parser"
@@ -59,7 +60,7 @@ func OutputAllLong(r io.Reader, w io.Writer, targets []string) error {
59
60
// getComments parses, filters, and sorts all comment nodes.
60
61
func getComments (r io.Reader , targets []string ) ([]parser.Comment , error ) {
61
62
nodes , err := parser .ParseRecursive (r , resolver .IncludePath )
62
-
63
+
63
64
if err != nil {
64
65
return nil , errors .Wrap (err , "parsing" )
65
66
}
@@ -126,7 +127,7 @@ func printVerbose(w io.Writer, c parser.Comment) (int, error) {
126
127
c .Value = c .Value + " (default)"
127
128
}
128
129
129
- return fmt .Fprintf (w , " %-s:\n %-s\n \n " , c .Target , indent (indent (c .Value )))
130
+ return fmt .Fprintf (w , " %-s:\n %-s\n \n " , color . HiBlueString ( c .Target ) , indent (indent (c .Value )))
130
131
}
131
132
132
133
func printShort (w io.Writer , c parser.Comment , width int ) (int , error ) {
@@ -135,5 +136,5 @@ func printShort(w io.Writer, c parser.Comment, width int) (int, error) {
135
136
comment = comment + " (default)"
136
137
}
137
138
138
- return fmt .Fprintf (w , " %-*s %-s\n " , width + 2 , c .Target , comment )
139
+ return fmt .Fprintf (w , " %-*s %-s\n " , width + 2 , color . HiBlueString ( c .Target ) , comment )
139
140
}
0 commit comments