@@ -77,8 +77,8 @@ var pathFilterDirectories = []string{"autom4te.cache", "blib", "_build", ".bzr",
7777// Apply changesets to file
7878func applyChangesetsToFile (fileitem fileitem , changesets []changeset ) (string , bool , error ) {
7979 var (
80- output string = ""
81- status bool = true
80+ output = ""
81+ status = true
8282 )
8383
8484 // try open file
@@ -278,7 +278,7 @@ func handleSpecialCliOptions(args []string) {
278278
279279 // --output
280280 if opts .Output != "" && len (args ) > 1 {
281- logFatalErrorAndExit (errors .New ("Only one file is allowed when using --output" ), 1 )
281+ logFatalErrorAndExit (errors .New ("only one file is allowed when using --output" ), 1 )
282282 }
283283
284284 if opts .LineinfileBefore != "" || opts .LineinfileAfter != "" {
@@ -287,7 +287,7 @@ func handleSpecialCliOptions(args []string) {
287287 }
288288
289289 if opts .LineinfileBefore != "" && opts .LineinfileAfter != "" {
290- logFatalErrorAndExit (errors .New ("Only --lineinfile-after or --lineinfile-before is allowed in --mode=lineinfile" ), 1 )
290+ logFatalErrorAndExit (errors .New ("only --lineinfile-after or --lineinfile-before is allowed in --mode=lineinfile" ), 1 )
291291 }
292292 }
293293}
@@ -330,7 +330,7 @@ func actionProcessFiles(changesets []changeset, fileitems []fileitem) int {
330330 os .Exit (0 )
331331 } else {
332332 // no files found, print error and exit with error code
333- logFatalErrorAndExit (errors .New ("No files specified" ), 1 )
333+ logFatalErrorAndExit (errors .New ("no files specified" ), 1 )
334334 }
335335 }
336336
@@ -381,7 +381,7 @@ func actionProcessFiles(changesets []changeset, fileitems []fileitem) int {
381381 }
382382
383383 if errorCount >= 1 {
384- fmt .Fprintf (os .Stderr , "[ERROR] %s failed with %d error(s)\n " , argparser .Command . Name , errorCount )
384+ fmt .Fprintf (os .Stderr , "[ERROR] %s failed with %d error(s)\n " , argparser .Name , errorCount )
385385 return 1
386386 }
387387
@@ -394,14 +394,14 @@ func buildChangesets() []changeset {
394394 if ! opts .ModeIsTemplate {
395395 if len (opts .Search ) == 0 || len (opts .Replace ) == 0 {
396396 // error: unequal numbers of search and replace options
397- logFatalErrorAndExit (errors .New ("Missing either --search or --replace for this mode" ), 1 )
397+ logFatalErrorAndExit (errors .New ("missing either --search or --replace for this mode" ), 1 )
398398 }
399399 }
400400
401401 // check if search and replace options have equal lenght (equal number of options)
402402 if len (opts .Search ) != len (opts .Replace ) {
403403 // error: unequal numbers of search and replace options
404- logFatalErrorAndExit (errors .New ("Unequal numbers of search or replace options" ), 1 )
404+ logFatalErrorAndExit (errors .New ("unequal numbers of search or replace options" ), 1 )
405405 }
406406
407407 // build changesets
0 commit comments