Skip to content

Commit 887b4a5

Browse files
committed
Fixed linting
1 parent f2cc2ea commit 887b4a5

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

cmd/constant.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package cmd
22

3-
import "os"
4-
53
var unwrapScalarFlag = newUnwrapFlag()
64

75
var unwrapScalar = false
@@ -26,12 +24,6 @@ var forceColor = false
2624
var forceNoColor = false
2725
var colorsEnabled = false
2826

29-
func init() {
30-
// when NO_COLOR environment variable presents and not an empty string the coloured output should be disabled;
31-
// refer to no-color.org
32-
forceNoColor = os.Getenv("NO_COLOR") != ""
33-
}
34-
3527
// can be either "" (off), "extract" or "process"
3628
var frontMatter = ""
3729

cmd/root.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ yq -P -oy sample.json
9090
logging.SetBackend(backend)
9191
yqlib.InitExpressionParser()
9292

93+
// when NO_COLOR environment variable presents and not an empty string the coloured output should be disabled;
94+
// refer to no-color.org
95+
forceNoColor = os.Getenv("NO_COLOR") != ""
96+
9397
return nil
9498
},
9599
}

0 commit comments

Comments
 (0)