Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <[email protected]>
  • Loading branch information
odubajDT committed Dec 16, 2024
1 parent 9d72077 commit 097aa96
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
12 changes: 0 additions & 12 deletions pkg/ottl/contexts/ottllog/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,6 @@ func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ot
if path.Keys() == nil {
return accessAttributes(), nil
}
// p, err := path.Keys()[0].Path()
// if err != nil {
// return nil, err
// }
// var subGetter ottl.GetSetter[TransformContext]
// if p.Keys() != nil {
// s, err := pep.parsePath(p)
// if err != nil {
// return nil, err
// }
// subGetter = s
// }
return accessAttributesKey(path.Keys()), nil
case "dropped_attributes_count":
return accessDroppedAttributesCount(), nil
Expand Down
5 changes: 0 additions & 5 deletions pkg/ottl/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@ func (g exprGetter[K]) Get(ctx context.Context, tCtx K) (any, error) {
default:
return nil, fmt.Errorf("type, %T, does not support int indexing", result)
}
case k.Path != nil:
// getter, err := p.newGetter(k.Path)
// if err != nil {
// return nil, err
// }
default:
return nil, fmt.Errorf("neither map nor slice index were set; this is an error in OTTL")
}
Expand Down
11 changes: 0 additions & 11 deletions pkg/ottl/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,6 @@ func (k *baseKey[K]) PathGetter() (GetSetter[K], error) {
}

func (p *Parser[K]) parsePath(ip *basePath[K]) (GetSetter[K], error) {
// path, err := ip.Keys()[0].Path()
// if err != nil {
// return nil, err
// }
// if p != nil {
// s, err := p.parsePath(path.(*basePath[K]))
// if err != nil {
// return nil, err
// }

// }
g, err := p.pathParser(ip)
if err != nil {
return nil, err
Expand Down

0 comments on commit 097aa96

Please sign in to comment.