3 ms·
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/shurc
by shurcooL 13y ago
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 https://github.com/shurcooL/goe#examples
- astrodust 13y agoWhat it needs is a `-e` flag: ruby -e 'puts 5 + 7'
- shurcooL 13y agoCan 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?
- astrodust 13y agoPerl, Ruby, Python, and many others have a succinct "evaluate this string" command-line flag. It's so commonplace it's to be expected.