We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7012605 commit ae41835Copy full SHA for ae41835
utils/batch_mode.go
@@ -0,0 +1,18 @@
1
+// Copyright 2023-2025 Princess Beef Heavy Industries, LLC / Dave Shanley
2
+// https://pb33f.io
3
+
4
+package utils
5
6
+// IsBatchMode checks if batch mode is enabled in function options.
7
+// When batch mode is enabled, all matched nodes are passed to the function
8
+// at once instead of invoking the function once per node.
9
+func IsBatchMode(options interface{}) bool {
10
+ if m, ok := options.(map[string]interface{}); ok {
11
+ if batch, exists := m["batch"]; exists {
12
+ if b, ok := batch.(bool); ok {
13
+ return b
14
+ }
15
16
17
+ return false
18
+}
0 commit comments