• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

AsaiYusuke / jsonpath / 16410926563

21 Jul 2025 07:14AM UTC coverage: 17.851% (-79.5%) from 97.363%
16410926563

Pull #46

github

AsaiYusuke
refactor: move syntax and tests to internal directory

Separate directory structure from public API by relocating syntax
and test files under internal/ directory structure.
Pull Request #46: Move syntax to the internal directory and reorganize tests

181 of 406 new or added lines in 17 files covered. (44.58%)

3 existing lines in 1 file now uncovered.

676 of 3787 relevant lines covered (17.85%)

17.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/internal/syntax/syntax_node_function_aggregate.go
1
package syntax
2

3
type syntaxAggregateFunction struct {
4
        *syntaxBasicNode
5

6
        function func([]interface{}) (interface{}, error)
7
        param    syntaxNode
8
}
9

10
func (f *syntaxAggregateFunction) retrieve(
11
        root, current interface{}, container *bufferContainer) errorRuntime {
×
12

×
13
        values := getContainer()
×
14
        defer func() {
×
15
                putContainer(values)
×
16
        }()
×
17

18
        if err := f.param.retrieve(root, current, values); err != nil {
×
19
                return err
×
20
        }
×
21

22
        result := values.result
×
23
        if !f.param.isValueGroup() {
×
24
                if arrayParam, ok := values.result[0].([]interface{}); ok {
×
25
                        result = arrayParam
×
26
                }
×
27
        }
28

29
        filteredValue, err := f.function(result)
×
30
        if err != nil {
×
NEW
31
                return newErrorFunctionFailed(f.errorRuntime.node, err.Error())
×
32
        }
×
33

34
        return f.retrieveAnyValueNext(root, filteredValue, container)
×
35
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc