• 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_qualifier_union.go
1
package syntax
2

3
import "reflect"
4

5
type syntaxUnionQualifier struct {
6
        *syntaxBasicNode
7

8
        subscripts []syntaxSubscript
9
}
10

11
func (u *syntaxUnionQualifier) retrieve(
12
        root, current interface{}, container *bufferContainer) errorRuntime {
×
13

×
14
        srcArray, ok := current.([]interface{})
×
15
        if !ok {
×
16
                foundType := msgTypeNull
×
17
                if current != nil {
×
18
                        foundType = reflect.TypeOf(current).String()
×
19
                }
×
NEW
20
                return newErrorTypeUnmatched(u.errorRuntime.node, msgTypeArray, foundType)
×
21
        }
22

23
        var deepestTextLen int
×
24
        var deepestError errorRuntime
×
25

×
26
        for _, subscript := range u.subscripts {
×
27
                for _, index := range subscript.getIndexes(len(srcArray)) {
×
28
                        if err := u.retrieveListNext(root, srcArray, index, container); err != nil {
×
29
                                if len(container.result) == 0 {
×
30
                                        deepestTextLen, deepestError = u.addDeepestError(err, deepestTextLen, deepestError)
×
31
                                }
×
32
                        }
33
                }
34
        }
35

36
        if len(container.result) > 0 {
×
37
                return nil
×
38
        }
×
39

40
        if deepestError == nil {
×
NEW
41
                return newErrorMemberNotExist(u.errorRuntime.node)
×
42
        }
×
43

44
        return deepestError
×
45
}
46

47
func (u *syntaxUnionQualifier) merge(union *syntaxUnionQualifier) {
×
48
        u.subscripts = append(u.subscripts, union.subscripts...)
×
49
}
×
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

© 2026 Coveralls, Inc