@@ -73,7 +73,7 @@ func Status(n note.CommitNote, options OutputOptions, projPath ...string) (strin
7373
7474 b := new (bytes.Buffer )
7575 t := template .Must (template .New ("Status" ).Funcs (funcMap ).Parse (statusTpl ))
76- cf := ColorFormater {color : options .Color }
76+ cf := colorFormater {color : options .Color }
7777 err := t .Execute (
7878 b ,
7979 struct {
@@ -86,7 +86,7 @@ func Status(n note.CommitNote, options OutputOptions, projPath ...string) (strin
8686 projPath ,
8787 projName ,
8888 commitNoteDetail {Note : n },
89- cf .White (true ),
89+ cf .white (true ),
9090 tags ,
9191 })
9292
@@ -107,7 +107,7 @@ func CommitSummary(projects []ProjectCommits, options OutputOptions) (string, er
107107
108108 b := new (bytes.Buffer )
109109 t := template .Must (template .New ("Commits" ).Funcs (funcMap ).Parse (commitSummaryTpl ))
110- cf := ColorFormater {color : options .Color }
110+ cf := colorFormater {color : options .Color }
111111 err := t .Execute (
112112 b ,
113113 struct {
@@ -116,8 +116,8 @@ func CommitSummary(projects []ProjectCommits, options OutputOptions) (string, er
116116 GreenFormat string
117117 }{
118118 lines ,
119- cf .White (true ),
120- cf .Green (false ),
119+ cf .white (true ),
120+ cf .green (false ),
121121 })
122122 if err != nil {
123123 return "" , err
@@ -134,7 +134,7 @@ func Commits(projects []ProjectCommits, options OutputOptions) (string, error) {
134134
135135 b := new (bytes.Buffer )
136136 t := template .Must (template .New ("CommitSummary" ).Funcs (funcMap ).Parse (commitsTpl ))
137- cf := ColorFormater {color : options .Color }
137+ cf := colorFormater {color : options .Color }
138138 err := t .Execute (
139139 b ,
140140 struct {
@@ -145,8 +145,8 @@ func Commits(projects []ProjectCommits, options OutputOptions) (string, error) {
145145 }{
146146 options .FullMessage ,
147147 notes ,
148- cf .White (true ),
149- cf .Green (false ),
148+ cf .white (true ),
149+ cf .green (false ),
150150 })
151151 if err != nil {
152152 return "" , err
@@ -169,7 +169,7 @@ func Timeline(projects []ProjectCommits, options OutputOptions) (string, error)
169169
170170 b := new (bytes.Buffer )
171171 t := template .Must (template .New ("Timeline" ).Funcs (funcMap ).Parse (timelineTpl ))
172- cf := ColorFormater {color : options .Color }
172+ cf := colorFormater {color : options .Color }
173173 err = t .Execute (
174174 b ,
175175 struct {
@@ -178,8 +178,8 @@ func Timeline(projects []ProjectCommits, options OutputOptions) (string, error)
178178 GreenFormat string
179179 }{
180180 timeline ,
181- cf .White (true ),
182- cf .Green (false ),
181+ cf .white (true ),
182+ cf .green (false ),
183183 })
184184 if err != nil {
185185 return "" , err
@@ -202,7 +202,7 @@ func TimelineCommits(projects []ProjectCommits, options OutputOptions) (string,
202202
203203 b := new (bytes.Buffer )
204204 t := template .Must (template .New ("Timeline" ).Funcs (funcMap ).Parse (timelineCommitTpl ))
205- cf := ColorFormater {color : options .Color }
205+ cf := colorFormater {color : options .Color }
206206 err = t .Execute (
207207 b ,
208208 struct {
@@ -211,8 +211,8 @@ func TimelineCommits(projects []ProjectCommits, options OutputOptions) (string,
211211 GreenFormat string
212212 }{
213213 timeline ,
214- cf .White (true ),
215- cf .Green (false ),
214+ cf .white (true ),
215+ cf .green (false ),
216216 })
217217 if err != nil {
218218 return "" , err
@@ -244,31 +244,31 @@ func Files(projects []ProjectCommits, options OutputOptions) (string, error) {
244244
245245}
246246
247- type ColorFormater struct {
247+ type colorFormater struct {
248248 color bool
249249}
250250
251- func (c ColorFormater ) HasColor () bool {
251+ func (c colorFormater ) hasColor () bool {
252252 return (c .color || isatty .IsTerminal (os .Stdout .Fd ())) && runtime .GOOS != "windows"
253253}
254254
255- func (c ColorFormater ) White (bold bool ) string {
255+ func (c colorFormater ) white (bold bool ) string {
256256 var attrBold int
257257 if bold {
258258 attrBold = 1
259259 }
260- if c .HasColor () {
260+ if c .hasColor () {
261261 return fmt .Sprintf ("\033 [%d;%dm%%s\033 [0m" , attrBold , 97 )
262262 }
263263 return "%s"
264264}
265265
266- func (c ColorFormater ) Green (bold bool ) string {
266+ func (c colorFormater ) green (bold bool ) string {
267267 var attrBold int
268268 if bold {
269269 attrBold = 1
270270 }
271- if c .HasColor () {
271+ if c .hasColor () {
272272 return fmt .Sprintf ("\033 [%d;%dm%%s\033 [0m" , attrBold , 32 )
273273 }
274274 return "%s"
0 commit comments