From c14637b185c451123e5ef4f044ffafb3fcd3bf43 Mon Sep 17 00:00:00 2001 From: neuroevolutus <19356702+neuroevolutus@users.noreply.github.com> Date: Sun, 12 Mar 2023 14:08:41 -0500 Subject: [PATCH] Remove duplicate number subtraction example --- pkg/yqlib/doc/operators/subtract.md | 18 ------------------ pkg/yqlib/operator_subtract_test.go | 9 --------- 2 files changed, 27 deletions(-) diff --git a/pkg/yqlib/doc/operators/subtract.md b/pkg/yqlib/doc/operators/subtract.md index 8184424c..902a3a14 100644 --- a/pkg/yqlib/doc/operators/subtract.md +++ b/pkg/yqlib/doc/operators/subtract.md @@ -59,24 +59,6 @@ a: -1.5 b: 4.5 ``` -## Number subtraction - float -If the lhs or rhs are floats then the expression will be calculated with floats. - -Given a sample.yml file of: -```yaml -a: 3 -b: 4.5 -``` -then -```bash -yq '.a = .a - .b' sample.yml -``` -will output -```yaml -a: -1.5 -b: 4.5 -``` - ## Number subtraction - int If both the lhs and rhs are ints then the expression will be calculated with ints. diff --git a/pkg/yqlib/operator_subtract_test.go b/pkg/yqlib/operator_subtract_test.go index e5134b06..b24474e9 100644 --- a/pkg/yqlib/operator_subtract_test.go +++ b/pkg/yqlib/operator_subtract_test.go @@ -67,15 +67,6 @@ var subtractOperatorScenarios = []expressionScenario{ "D0, P[], (doc)::{a: -1.5, b: 4.5}\n", }, }, - { - description: "Number subtraction - float", - subdescription: "If the lhs or rhs are floats then the expression will be calculated with floats.", - document: `{a: 3, b: 4.5}`, - expression: `.a = .a - .b`, - expected: []string{ - "D0, P[], (doc)::{a: -1.5, b: 4.5}\n", - }, - }, { description: "Number subtraction - int", subdescription: "If both the lhs and rhs are ints then the expression will be calculated with ints.",