Hacker News new | ask | show | jobs
by alsetmusic 799 days ago
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?

1 comments

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.