Roger Peppe

Results 283 comments of Roger Peppe

In Haskell, it makes sense as it's common to curry the fmap call with its function argument. Go doesn't have currying, so that argument doesn't apply here. Also, in Haskell,...

I'd just document it like: The copy plugin generates a function of the form: func deriveCopy(dst, src T) for some type T, which copies the contents of src into dst....

I'd prefer not to go to github every time I wonder what plugins are available or when I'm wondering what a particular plugin does (in the same way that I...

Not *that* much, apart from the fact that: - a user of goderive shouldn't need to know the canonical import path of goderive. Someone may have forked goderive and added...

Yes, this looks nice. I think I'd suggest naming the subcommand "help" rather than "doc". Then we could have: goderive help (or --help): show information on command line flags and...

Perhaps. That seems a little verbose though. I suspect it might be nicer if each plugin provided a single line summary: fmap: map a function onto a list It might...

I'm not sure that this is necessarily a good thing - there are arguments both ways. It's not always OK to modify the slice that's being passed in. I suspect...

note that you only need such a nested module for tools that don't contain a go.mod file. Hopefully that will become increasingly uncommon as time goes on.

@mvdan FWIW `gobin -u honnef.co/go/tools/cmd/staticcheck` works fine. The problem here is the `/...` suffix.

Warnings are problematic (do you see the warning if you're running gobin in a script, for example?) How about failing, and requiring a flag to force it to install anyway....