@@ -101,11 +101,11 @@ func (s *Shortener) Shorten(contents []byte) ([]byte, error) {
101101 // Do initial, non-line-length-aware formatting
102102 contents , err = s .formatSrc (contents )
103103 if err != nil {
104- return nil , fmt .Errorf ("Error formatting source: %+v" , err )
104+ return nil , fmt .Errorf ("error formatting source: %+v" , err )
105105 }
106106
107107 for {
108- log .Debugf ("Starting round %d" , round )
108+ log .Debugf ("starting round %d" , round )
109109
110110 // Annotate all long lines
111111 lines := strings .Split (string (contents ), "\n " )
@@ -125,7 +125,7 @@ func (s *Shortener) Shorten(contents []byte) ([]byte, error) {
125125 }
126126
127127 if stop {
128- log .Debug ("Nothing more to shorten or reformat, stopping" )
128+ log .Debug ("nothing more to shorten or reformat, stopping" )
129129 break
130130 }
131131
@@ -144,7 +144,7 @@ func (s *Shortener) Shorten(contents []byte) ([]byte, error) {
144144 }
145145 defer dotFile .Close ()
146146
147- log .Debugf ("Writing dot file output to %s" , s .config .DotFile )
147+ log .Debugf ("writing dot file output to %s" , s .config .DotFile )
148148 err = CreateDot (result , dotFile )
149149 if err != nil {
150150 return nil , err
@@ -160,14 +160,14 @@ func (s *Shortener) Shorten(contents []byte) ([]byte, error) {
160160 output := bytes .NewBuffer ([]byte {})
161161 err = decorator .Fprint (output , result )
162162 if err != nil {
163- return nil , fmt .Errorf ("Error parsing source: %+v" , err )
163+ return nil , fmt .Errorf ("error parsing source: %+v" , err )
164164 }
165165 contents = output .Bytes ()
166166
167167 round ++
168168
169169 if round > maxRounds {
170- log .Debugf ("Hit max rounds, stopping" )
170+ log .Debugf ("hit max rounds, stopping" )
171171 break
172172 }
173173 }
@@ -182,7 +182,7 @@ func (s *Shortener) Shorten(contents []byte) ([]byte, error) {
182182 // Do final round of non-line-length-aware formatting after we've fixed up the comments
183183 contents , err = s .formatSrc (contents )
184184 if err != nil {
185- return nil , fmt .Errorf ("Error formatting source: %+v" , err )
185+ return nil , fmt .Errorf ("error formatting source: %+v" , err )
186186 }
187187
188188 return contents , nil
@@ -357,20 +357,20 @@ func (s *Shortener) isGoDirective(line string) bool {
357357func (s * Shortener ) formatNode (node dst.Node ) {
358358 switch n := node .(type ) {
359359 case dst.Decl :
360- log .Debugf ("Processing declaration: %+v" , n )
360+ log .Debugf ("processing declaration: %+v" , n )
361361 s .formatDecl (n )
362362 case dst.Expr :
363- log .Debugf ("Processing expression: %+v" , n )
363+ log .Debugf ("processing expression: %+v" , n )
364364 s .formatExpr (n , false , false )
365365 case dst.Stmt :
366- log .Debugf ("Processing statement: %+v" , n )
366+ log .Debugf ("processing statement: %+v" , n )
367367 s .formatStmt (n )
368368 case dst.Spec :
369- log .Debugf ("Processing spec: %+v" , n )
369+ log .Debugf ("processing spec: %+v" , n )
370370 s .formatSpec (n , false )
371371 default :
372372 log .Debugf (
373- "Got a node type that can't be shortened: %+v" ,
373+ "got a node type that can't be shortened: %+v" ,
374374 reflect .TypeOf (n ),
375375 )
376376 }
@@ -393,7 +393,7 @@ func (s *Shortener) formatDecl(decl dst.Decl) {
393393 }
394394 default :
395395 log .Debugf (
396- "Got a declaration type that can't be shortened: %+v" ,
396+ "got a declaration type that can't be shortened: %+v" ,
397397 reflect .TypeOf (d ),
398398 )
399399 }
@@ -473,7 +473,7 @@ func (s *Shortener) formatStmt(stmt dst.Stmt) {
473473 default :
474474 if shouldShorten {
475475 log .Debugf (
476- "Got a statement type that can't be shortened: %+v" ,
476+ "got a statement type that can't be shortened: %+v" ,
477477 reflect .TypeOf (st ),
478478 )
479479 }
@@ -565,7 +565,7 @@ func (s *Shortener) formatExpr(expr dst.Expr, force bool, isChain bool) {
565565 default :
566566 if shouldShorten {
567567 log .Debugf (
568- "Got an expression type that can't be shortened: %+v" ,
568+ "got an expression type that can't be shortened: %+v" ,
569569 reflect .TypeOf (e ),
570570 )
571571 }
@@ -585,7 +585,7 @@ func (s *Shortener) formatSpec(spec dst.Spec, force bool) {
585585 default :
586586 if shouldShorten {
587587 log .Debugf (
588- "Got a spec type that can't be shortened: %+v" ,
588+ "got a spec type that can't be shortened: %+v" ,
589589 reflect .TypeOf (sp ),
590590 )
591591 }
0 commit comments