Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2017-01-05 Thread Aurélien DESBRIÈRES
Thanks a lot! On Thu, Jan 5, 2017 at 11:32 AM Konstantin Khomoutov < flatw...@users.sourceforge.net> wrote: > On Thu, 5 Jan 2017 02:09:24 -0800 (PST) > Aurélien Desbrières wrote: > > > Vendor?? you mean I have to pay to write software? I have to pay to > > use a

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2017-01-05 Thread Aurélien Desbrières
Vendor?? you mean I have to pay to write software? I have to pay to use a lib? On Thursday, January 5, 2017 at 8:19:21 AM UTC+1, Konstantin Khomoutov wrote: > > On Tue, 3 Jan 2017 00:00:27 -0800 (PST) > Caleb Doxsey wrote: > > > What's wrong with a library? > > > > This

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2017-01-04 Thread Konstantin Khomoutov
On Tue, 3 Jan 2017 00:00:27 -0800 (PST) Caleb Doxsey 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

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-30 Thread Aurélien Desbrières
> > There is no blah nor ~ in the original > code https://play.golang.org/p/CTbhTC50eE As is, it is able to interpret the ~ in direct execution but not on the request during execution. You have to execute that script on your machine not on the playground to see it works. -- You received

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-30 Thread Konstantin Khomoutov
On Fri, 30 Dec 2016 06:12:46 + Aurélien DESBRIÈRES wrote: > > > The original code is https://play.golang.org/p/CTbhTC50eE > > > It is write to works as: > > > > > > go run gocat.go > > > > > > Here is how it works at this time. > > > > > > $ go run gocat.go > >

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-29 Thread Aurélien DESBRIÈRES
What do you mean by more safe? On Fri, Dec 30, 2016, 4:04 AM Matt Harden wrote: > Based on Jan's reply, https://play.golang.org/p/-7NUaJwoOf is a little > more safe. > > On Thu, Dec 29, 2016 at 8:13 AM Aurélien Desbrières < > aurelien.desbrie...@gmail.com> wrote: > > The

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-29 Thread Matt Harden
Based on Jan's reply, https://play.golang.org/p/-7NUaJwoOf is a little more safe. On Thu, Dec 29, 2016 at 8:13 AM Aurélien Desbrières < aurelien.desbrie...@gmail.com> wrote: > The original code is https://play.golang.org/p/CTbhTC50eE > It is write to works as: > > go run gocat.go > > Here is how

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-29 Thread Aurélien Desbrières
The original code is https://play.golang.org/p/CTbhTC50eE It is write to works as: go run gocat.go Here is how it works at this time. $ go run gocat.go Which file would you like to read?: ~/bob 2016/12/29 17:10:19 my program broken exit status 1 $ go run gocat3.go Which file would you like to

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-29 Thread Jan Mercl
On Thu, Dec 29, 2016 at 2:41 PM Aurélien Desbrières < aurelien.desbrie...@gmail.com> wrote: Something like https://play.golang.org/p/v0qPerJi4y ? -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-29 Thread Aurélien Desbrières
Oh so that is not an official stuff from go but an outside library ~_~ Is there any ways more "official" to do that? On Thursday, December 29, 2016 at 7:17:02 AM UTC+1, Aurélien Desbrières wrote: > > That sounds good. I will try it and tell you back. Thanks > > On Thu, Dec 29, 2016, 5:02 AM

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-28 Thread Aurélien DESBRIÈRES
That sounds good. I will try it and tell you back. Thanks On Thu, Dec 29, 2016, 5:02 AM Caleb Doxsey wrote: > You can use this library: > https://godoc.org/github.com/mitchellh/go-homedir#Expand > > > On Wednesday, December 28, 2016 at 8:22:06 AM UTC-5, Aurélien Desbrières >

[go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-28 Thread Caleb Doxsey
You can use this library: https://godoc.org/github.com/mitchellh/go-homedir#Expand On Wednesday, December 28, 2016 at 8:22:06 AM UTC-5, Aurélien Desbrières wrote: > > As explain ~/ in golang , I > am trying to request the user to cat a file with a

[go-nuts] Re: How to use ~/ in terminal with go program?

2016-12-28 Thread C Banning
if file[0] == '~' { On Wednesday, December 28, 2016 at 6:22:06 AM UTC-7, Aurélien Desbrières wrote: > > As explain ~/ in golang , I > am trying to request the user to cat a file with a gocat program. > > The point is that if the user tell to the