Hacker News new | past | comments | ask | show | jobs | submit login

Related to cli and Go, if you ever want to quickly execute Go funcs from a terminal [1]:

    $ goe go/parser 'ParseExpr("5 + 7")'
[1] https://github.com/shurcooL/goe#examples



What it needs is a `-e` flag:

    ruby -e 'puts 5 + 7'


Can you please elaborate on how that would help?

Is it just for familiarity/similarity? I kinda see the 'e' from ruby -e going after the go to form goe. goe -e would be just redundant, wouldn't it?


Perl, Ruby, Python, and many others have a succinct "evaluate this string" command-line flag. It's so commonplace it's to be expected.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: