From 22f7a93a854f0f606b785b917c93c295c423a7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 20 Nov 2023 23:42:31 +0200 Subject: [PATCH] Grammar fixes --- debian/changelog | 2 +- pkg/yqlib/data_tree_navigator.go | 2 +- pkg/yqlib/doc/operators/boolean-operators.md | 2 +- pkg/yqlib/doc/operators/headers/boolean-operators.md | 2 +- pkg/yqlib/doc/operators/multiply-merge.md | 2 +- pkg/yqlib/operator_multiply_test.go | 2 +- pkg/yqlib/operator_to_number.go | 2 +- release_notes.txt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index e9ce1202..5c73e194 100644 --- a/debian/changelog +++ b/debian/changelog @@ -135,7 +135,7 @@ yq (4.9.6) focal; urgency=medium yq (3.3.2) focal; urgency=medium * Bug fix: existStatus bug (#459) - * Automatically makes a os temp directory if it does not exist (#461) + * Automatically makes an os temp directory if it does not exist (#461) -- Roberto Mier Escandon Fri, 07 Aug 2020 18:53:01 +0200 diff --git a/pkg/yqlib/data_tree_navigator.go b/pkg/yqlib/data_tree_navigator.go index 9a246027..a305b602 100644 --- a/pkg/yqlib/data_tree_navigator.go +++ b/pkg/yqlib/data_tree_navigator.go @@ -7,7 +7,7 @@ import ( ) type DataTreeNavigator interface { - // given the context and a expressionNode, + // given the context and an expressionNode, // this will process the against the given expressionNode and return // a new context of matching candidates GetMatchingNodes(context Context, expressionNode *ExpressionNode) (Context, error) diff --git a/pkg/yqlib/doc/operators/boolean-operators.md b/pkg/yqlib/doc/operators/boolean-operators.md index 887817d7..15327666 100644 --- a/pkg/yqlib/doc/operators/boolean-operators.md +++ b/pkg/yqlib/doc/operators/boolean-operators.md @@ -4,7 +4,7 @@ The `or` and `and` operators take two parameters and return a boolean result. `not` flips a boolean from true to false, or vice versa. -`any` will return `true` if there are any `true` values in a array sequence, and `all` will return true if _all_ elements in an array are true. +`any` will return `true` if there are any `true` values in an array sequence, and `all` will return true if _all_ elements in an array are true. `any_c(condition)` and `all_c(condition)` are like `any` and `all` but they take a condition expression that is used against each element to determine if it's `true`. Note: in `jq` you can simply pass a condition to `any` or `all` and it simply works - `yq` isn't that clever..yet diff --git a/pkg/yqlib/doc/operators/headers/boolean-operators.md b/pkg/yqlib/doc/operators/headers/boolean-operators.md index 6d457cb3..5b4ab5e3 100644 --- a/pkg/yqlib/doc/operators/headers/boolean-operators.md +++ b/pkg/yqlib/doc/operators/headers/boolean-operators.md @@ -4,7 +4,7 @@ The `or` and `and` operators take two parameters and return a boolean result. `not` flips a boolean from true to false, or vice versa. -`any` will return `true` if there are any `true` values in a array sequence, and `all` will return true if _all_ elements in an array are true. +`any` will return `true` if there are any `true` values in an array sequence, and `all` will return true if _all_ elements in an array are true. `any_c(condition)` and `all_c(condition)` are like `any` and `all` but they take a condition expression that is used against each element to determine if it's `true`. Note: in `jq` you can simply pass a condition to `any` or `all` and it simply works - `yq` isn't that clever..yet diff --git a/pkg/yqlib/doc/operators/multiply-merge.md b/pkg/yqlib/doc/operators/multiply-merge.md index 3d4a67e1..a7cf3d62 100644 --- a/pkg/yqlib/doc/operators/multiply-merge.md +++ b/pkg/yqlib/doc/operators/multiply-merge.md @@ -519,7 +519,7 @@ will output some: thing ``` -## Merging an null with an array +## Merging a null with an array Running ```bash yq --null-input 'null * ["some"]' diff --git a/pkg/yqlib/operator_multiply_test.go b/pkg/yqlib/operator_multiply_test.go index c099ddb0..1a8e83d4 100644 --- a/pkg/yqlib/operator_multiply_test.go +++ b/pkg/yqlib/operator_multiply_test.go @@ -594,7 +594,7 @@ var multiplyOperatorScenarios = []expressionScenario{ }, }, { - description: "Merging an null with an array", + description: "Merging a null with an array", expression: `null * ["some"]`, expected: []string{ "D0, P[], (!!seq)::- some\n", diff --git a/pkg/yqlib/operator_to_number.go b/pkg/yqlib/operator_to_number.go index 1b951778..595ca538 100644 --- a/pkg/yqlib/operator_to_number.go +++ b/pkg/yqlib/operator_to_number.go @@ -7,7 +7,7 @@ import ( ) func tryConvertToNumber(value string) (string, bool) { - // try a int first + // try an int first _, _, err := parseInt64(value) if err == nil { return "!!int", true diff --git a/release_notes.txt b/release_notes.txt index 5161764d..ec1c7a85 100644 --- a/release_notes.txt +++ b/release_notes.txt @@ -275,7 +275,7 @@ - Fixed bug - handle expressions that match a directory (e.g. ".") 4.19.1: - - New [eval](https://mikefarah.gitbook.io/yq/operators/eval) _operator_ that allows dynamic expression evaluation (e.g. from a env variable) (#1087) + - New [eval](https://mikefarah.gitbook.io/yq/operators/eval) _operator_ that allows dynamic expression evaluation (e.g. from an env variable) (#1087) - Adding new elements to array now automatically applies styling of existing elements (#722) 4.18.1: