On Mon, Mar 29, 2010 at 2:41 AM, Szabolcs Nagy <nszabolcs_AT_gmail.com> wrote:
> On 3/29/10, Jeff Shipley <jeffquiparle_AT_gmail.com> wrote:
>> If you feel like criticizing, suggesting improvements, or helping out,
>> check it out at http://bitbucket.org/amertune/goblin
>>
>>
>
> grep.go:7: fatal error: can't find import: optparse
> i think you should use the "flag" package there as well
>
> in cat i think (&buf)[0:n] is the same as buf[0:n]
>
> the underscore_naming_style does not look nice in go somehow
>
>
The Makefile isn't quite right for grep. It expects to find a compiled
optparse in the _obj directory.
The primary reason I went with the optparse library instead of using
flag is that flag doesn't support multiple values for the same flag.
grep -e expression1 -e expression2 -e expression3
would be completely broken when using the flag package. I know that
it's not really necessary; -e '(expression1|expression2|expression3)'
would do the exact same thing. Still, it's a feature of grep that I
like, and not one that I'd want to drop just because the built-in
package doesn't support it.
The biggest thing I don't like about using optparse for grep (and flag
for everything else) is that it breaks consistency with the other
programs. grep can group options (-hnv), while none of the other
programs can. I'm considering moving everything over to optparse, for
consistency.
Thanks for the language tips, I just started learning Go last week
when I started this project.
Received on Mon Mar 29 2010 - 15:51:25 UTC
This archive was generated by hypermail 2.2.0 : Mon Mar 29 2010 - 16:00:04 UTC