News for hackers. Stuff that matters.
Re:Purl: A Simple Tool for Text Processing by alsetmusic on Sunday April 14, 2024 @09:47PM (#40036300)
Can it only work on piped input? I tried running in the form of `./purl main.go -filter func` and the result was:

> Failed to validate input: invalid replace expression format. Use "@search@replace@"

Do you plan to add the ability for it to act on files directly?

Re:Purl: A Simple Tool for Text Processing by catatsuy on Sunday April 14, 2024 @10:19PM (#40036478)
Thank you for trying out purl! Currently, the file name needs to be placed at the end of the command like this: purl -filter func main.go. This format helps purl understand which part of the command specifies the options and which part specifies the file.

I appreciate your feedback and understand that a more flexible command structure might be easier for users. We will consider making this change in future versions to accommodate different usage preferences.