Fixed linting

This commit is contained in:
Mike Farah 2024-11-16 12:04:43 +11:00
parent f2cc2ea5a8
commit 887b4a560f
2 changed files with 4 additions and 8 deletions

View File

@ -1,7 +1,5 @@
package cmd
import "os"
var unwrapScalarFlag = newUnwrapFlag()
var unwrapScalar = false
@ -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 = ""

View File

@ -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
},
}