On Tue, 3 Jan 2017 00:00:27 -0800 (PST)
Caleb Doxsey <ca...@doxsey.net> wrote:

> What's wrong with a library?
> 
> This particular library is used by vagrant and dozens of other
> software projects, it's cross platform and handles all the edge cases.
> 
> Never relying on 3rd party libraries is a very inefficient way to
> write software. Seems like even just copying the code would be more
> productive than writing it from scratch. It has a very permissive
> license: https://github.com/mitchellh/go-homedir/blob/master/LICENSE.
[...]

To be honest, the implementation of that library is rather naive.
For some reason, it doesn't use Go's built-in features but resorts fo
calling out /usr/bin/getent on non-Darwin POSIX systems.  The author
explains their point in the README but I, for one, do not buy into
their reasoning completely (because I have no use for/of Macs).

All-in-all, the point everyone ignores is that why the OP wanted to do
tilde expansion by hand? ;-)  It appears, that they were implementing a
cat-like program which for some reason would *ask* the user to input
the name of the file to cat -- interactively.  I'd say this goes
against the Unix command-line usage paradigms.  That is, it's okay as
a programming exersize but otherwise is actively harmful for any
production-usage code I may envision.

And since this is a programming exersize, I think it's okay of the OP
would exersize theirselves more, and write the necessary code by hand.

Well, the proplem is that instead of researching the topic they have
just asked for a ready-made solution.
Exactly as nailed down in the famous <http://whathaveyoutried.com>.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to