Skip to content

Conversation

@wanglong001
Copy link

@wanglong001 wanglong001 commented Dec 6, 2022

[feat] ExecForEach: Get parameters by column index

#152

func ExamplePipe_ExecForEach() {
script.Echo("a\nb\nc\n").ExecForEach("echo {{.}}").Stdout()
script.Echo("a\nb\nc\n").ExecForEach("echo {{.Raw}}").Stdout()
script.Echo("a aa\nb bb\nc cc\n").ExecForEach("echo {{index .Cols 1}} {{index .Cols 0}}").Stdout()
Copy link

@lazysegtree lazysegtree Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bitfield Is there any conclusion on this ? Issue #152 doesn't seems to have any clear conclusion either

Do we want this feature or not ?
I assume it will be a breaking change as users will have to go from {{.}} to {{.Raw}}

@bitfield bitfield closed this Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants