Question: Is there planned support for iterator in version 1.23?
還沒有人認領這個 Issue。
評估
研究方向
此 issue 未指定檔案或測試。先追蹤現有的 array 函式,以及範例中顯示的 expr.Func 整合,然後將它們的輸入與 Go 1.23 的 iter.Seq 進行比較。要視為完成,需要由 maintainer 決定範圍,並且如果接受,還需要為基於 iterator 的值指定測試。
由索引模型根據 Issue 內容生成。
描述
Hi @antonmedv
Golang 1.23 will support the iter package and define the type Seq[V any] as an iterator. The expr package supports numerous array functions. I believe iterators will be widely used in many libraries in the future. Is there any plan for these array functions to support not only arrays but also iterators in version 1.23?
Use slice.Values as example
// Values is slices.Values inject by expr.Func
let v = Values([1, 2, 3]);
any(Values, { # > 1}) // [2, 3]
I understand this example is quite simple and not necessary (because we can directly use the array in any). However, please imagine that the iterator might not be iterating over an array.
Reference
https://tip.golang.org/doc/go1.23
https://pkg.go.dev/iter@master
- 主要語言
- Go
- 星號
- 8.1k
- 分支
- 534
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
expr-lang/expr 的其他 Issue
-
Docs: Built in functions shadow user variables可能已有人在做 @sanmaxdev 於 115 天前認領。 未關閉docs needed
難度 1/5 1-3 小時 新手友好度 62/100
-
難度 4/5 1-2 天 新手友好度 35/100
-
`in` operator on a struct doesn't respect `expr` tags可能已有人在做 @akashchamp 於 35 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 65/100
-
`find`, `findIndex`, `first` and `get` are type-checked as the element type where they return nil可能已有人在做 @TastyHeadphones 於 32 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 65/100
-
難度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
VLAgent `spec.k8sCollector.includePodLabels: false` has no effect可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
VictoriaMetrics/operator#2772 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
Gaurav-Gosain/tuios#1316 ·
維護者通常 1 天內回覆
-
area:auth documentation priority:low
難度 1/5 1-3 小時 新手友好度 86/100
維護者通常 1 天內回覆
-
Mend: dependency security vulnerability
難度 2/5 1-3 小時 新手友好度 65/100
kube-tarian/sigrun#203 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
kubernetes-csi/csi-driver-iscsi#485 ·
維護者通常 1 天內回覆