From 8c111438e7b8ba4d0972a48ddf89ad8b15ff38a4 Mon Sep 17 00:00:00 2001 From: diegolara93 Date: Fri, 24 Jan 2025 16:49:42 -0600 Subject: [PATCH 1/3] text/template improved comparison error addresses issue #71421 --- .idea/go.iml | 4 ++ .idea/inspectionProfiles/Project_Default.xml | 7 ++ .idea/prettier.xml | 6 ++ .idea/vcs.xml | 6 ++ .idea/workspace.xml | 72 ++++++++++++++++++++ src/text/template/funcs.go | 2 +- 6 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 .idea/go.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/prettier.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/go.iml b/.idea/go.iml new file mode 100644 index 00000000000000..7ee078df7b0ba7 --- /dev/null +++ b/.idea/go.iml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000000000..7c4836fbe32725 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml new file mode 100644 index 00000000000000..b0c1c68fbbad6b --- /dev/null +++ b/.idea/prettier.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000000000..35eb1ddfbbc029 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000000000..b3dc2230dd5743 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + { + "lastFilter": { + "state": "OPEN", + "assignee": "diegolara93" + } +} + { + "selectedUrlAndAccountId": { + "url": "https://github.com/diegolara93/go.git", + "accountId": "69600390-26e0-4623-8c21-2e17bbf2fe2d" + } +} + { + "associatedIndex": 8 +} + + + + + + + + + + + + + + + true + + \ No newline at end of file diff --git a/src/text/template/funcs.go b/src/text/template/funcs.go index 7d63cf8b7bb6db..1fa5b5beec2dfe 100644 --- a/src/text/template/funcs.go +++ b/src/text/template/funcs.go @@ -553,7 +553,7 @@ func lt(arg1, arg2 reflect.Value) (bool, error) { case k1 == uintKind && k2 == intKind: truth = arg2.Int() >= 0 && arg1.Uint() < uint64(arg2.Int()) default: - return false, errBadComparison + return false, fmt.Errorf("incompatible types for comparison: %v and %v", arg1.Type(), arg2.Type()) } } else { switch k1 { From 3972ea698fbcb38a58e95c0fc164c833ec7f75a9 Mon Sep 17 00:00:00 2001 From: diegolara93 Date: Fri, 24 Jan 2025 18:39:57 -0600 Subject: [PATCH 2/3] removed .idea and handled second case (eq function) --- .idea/go.iml | 4 ---- .idea/inspectionProfiles/Project_Default.xml | 7 ------ .idea/prettier.xml | 6 ----- .idea/vcs.xml | 6 ----- .idea/workspace.xml | 24 +++++++++++++++++++- src/text/template/funcs.go | 2 +- 6 files changed, 24 insertions(+), 25 deletions(-) delete mode 100644 .idea/go.iml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/prettier.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/go.iml b/.idea/go.iml deleted file mode 100644 index 7ee078df7b0ba7..00000000000000 --- a/.idea/go.iml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 7c4836fbe32725..00000000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml deleted file mode 100644 index b0c1c68fbbad6b..00000000000000 --- a/.idea/prettier.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfbbc029..00000000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b3dc2230dd5743..2e7762b43f752e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,6 +5,11 @@ + + + + +