mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-12 19:25:37 +00:00
Fixed linting
This commit is contained in:
parent
f2cc2ea5a8
commit
887b4a560f
@ -1,7 +1,5 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import "os"
|
|
||||||
|
|
||||||
var unwrapScalarFlag = newUnwrapFlag()
|
var unwrapScalarFlag = newUnwrapFlag()
|
||||||
|
|
||||||
var unwrapScalar = false
|
var unwrapScalar = false
|
||||||
@ -26,12 +24,6 @@ var forceColor = false
|
|||||||
var forceNoColor = false
|
var forceNoColor = false
|
||||||
var colorsEnabled = 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"
|
// can be either "" (off), "extract" or "process"
|
||||||
var frontMatter = ""
|
var frontMatter = ""
|
||||||
|
|
||||||
|
@ -90,6 +90,10 @@ yq -P -oy sample.json
|
|||||||
logging.SetBackend(backend)
|
logging.SetBackend(backend)
|
||||||
yqlib.InitExpressionParser()
|
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
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user