Skip to content

Commit

Permalink
Fixed linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefarah committed Nov 16, 2024
1 parent f2cc2ea commit 887b4a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 0 additions & 8 deletions cmd/constant.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package cmd

import "os"

var unwrapScalarFlag = newUnwrapFlag()

var unwrapScalar = false
Expand All @@ -26,12 +24,6 @@ var forceColor = false
var forceNoColor = false
var colorsEnabled = false

func init() {
// when NO_COLOR environment variable presents and not an empty string the coloured output should be disabled;
// refer to no-color.org
forceNoColor = os.Getenv("NO_COLOR") != ""
}

// can be either "" (off), "extract" or "process"
var frontMatter = ""

Expand Down
4 changes: 4 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ yq -P -oy sample.json
logging.SetBackend(backend)
yqlib.InitExpressionParser()

// when NO_COLOR environment variable presents and not an empty string the coloured output should be disabled;
// refer to no-color.org
forceNoColor = os.Getenv("NO_COLOR") != ""

return nil
},
}
Expand Down

0 comments on commit 887b4a5

Please sign in to comment.