Skip to content

Allow methods to be used in pipes foo | some.Method(42) | foo.Bar() #791

@KyleSanderson

Description

@KyleSanderson
map(filter(Imp.GetTorrents(nil), .Name contains `The.Simpsons`), .Hash) | Imp.RemoveTags(`yamz`)","error":"unexpected token Operator(\".\") (1:78)\n | map(filter(Imp.GetTorrents(nil), .Name contains `The.Clam`), .Hash) | Imp.RemoveTags(`yamz`)
{"level":"trace","program":"test-program","query":"map(filter(Imp.GetTorrents(nil), .Name contains `The.Clam`), .Hash) | Imp.RemoveTags(`yamz`)","error":"unexpected token Operator(\".\") (1:78)\n | map(filter(Imp.GetTorrents(nil), .Name contains `The.Simpsons`), .Hash) | Imp.RemoveTags(`yamz`)\n | .............................................................................^","time":1747350352,"message":"expr completed: <nil>"}

vs

let egg = Imp.RemoveTags; map(filter(Imp.GetTorrents(nil), .Name contains `The.Clam`), .Hash) | egg(`yamz`)
{"level":"trace","program":"test-program","query":"let egg = Imp.RemoveTags; map(filter(Imp.GetTorrents(nil), .Name contains `The.Clam`), .Hash) | egg(`yamz`)","time":1747350503,"message":"expr completed: <nil>"}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions