Re: [go-nuts] Error while executing exec.command

2021-03-16 Thread Sharan Guhan
Thanks a bunch !! 'ioutils.ReadFIle' did the trick :) Sharan On Mon, Mar 15, 2021 at 3:43 PM 'Axel Wagner' via golang-nuts < golang-nuts@googlegroups.com> wrote: > I would also suggest to just use os.ReadFile > , instead of executing `cat`. The > latter is

Re: [go-nuts] Error while executing exec.command

2021-03-15 Thread 'Axel Wagner' via golang-nuts
I would also suggest to just use os.ReadFile , instead of executing `cat`. The latter is pointless overhead and unnecessarily fragile. On Mon, Mar 15, 2021 at 11:40 PM Amit Saha wrote: > > > On Tue, 16 Mar 2021, 9:37 am Sharan Guhan, wrote: > >> Hi Experts,

Re: [go-nuts] Error while executing exec.command

2021-03-15 Thread Amit Saha
On Tue, 16 Mar 2021, 9:37 am Sharan Guhan, wrote: > Hi Experts, > > I am relatively new to GOLANG and trying a simple program as below which > is failing in fetching the output of a file, which works otherwise on the > command prompt: > > Lang : GOLANG > OS : Linux/Centos > Problem : Using

[go-nuts] Error while executing exec.command

2021-03-15 Thread Sharan Guhan
Hi Experts, I am relatively new to GOLANG and trying a simple program as below which is failing in fetching the output of a file, which works otherwise on the command prompt: Lang : GOLANG OS : Linux/Centos Problem : Using exec.command to get the output of a certain file Error: Getting no such

Re: [go-nuts] on 'while'

2020-12-07 Thread Ian Lance Taylor
On Mon, Dec 7, 2020 at 11:18 AM Oliver Smith wrote: > > Recognizing this is likely to be a dead horse already flogged to infinity, > I've been unsuccessful trying to find discussions on the topic of why while > was nixed in-favor of the more verbose and error-prone for-based > implementations,

[go-nuts] on 'while'

2020-12-07 Thread Oliver Smith
Recognizing this is likely to be a dead horse already flogged to infinity, I've been unsuccessful trying to find discussions on the topic of why while was nixed in-favor of the more verbose and error-prone for-based implementations, hoped someone could furnish links? c.f // concise,

Re: [go-nuts] Re: While implement ssh client using golang, record keyboard input

2020-09-15 Thread Marvin Renich
* sc3983...@gmail.com [200915 11:41]: > Hi Everyone: > > I have the same problem, How do I get user input command, with *SSH > client with a Interactive Shell* > > 在 2018年10月23日星期二 UTC+8上午4:57:50,Sun Frank写道: > > > > Hi Everyone: > > > > I came across a problem which puzzled me for

[go-nuts] Re: While implement ssh client using golang, record keyboard input

2020-09-15 Thread sc3983315
Hi Everyone: I have the same problem, How do I get user input command, with *SSH client with a Interactive Shell* 在 2018年10月23日星期二 UTC+8上午4:57:50,Sun Frank写道: > > Hi Everyone: > > I came across a problem which puzzled me for couple of days. I am trying > to write a* SSH client with a

[go-nuts] Error while using "github.com/coreos/etcd/clientV3"

2020-05-08 Thread Yashi Gupta
I have been trying to use *"github.com/coreos/etcd/clientv3" for creating a microservice * but while "go build" It shows the following error. *cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type

[go-nuts] Re: While implement ssh client using golang, record keyboard input

2018-10-26 Thread zwb0511
HI , you can capture and store the sdtin buffer and handle it then, for example: // Set IO session.Stdout = os.Stdout session.Stderr = os.Stderr in, _ := session.StdinPipe() go func() { for { var buffer [1024]byte n, err := os.Stdin.Read(buffer[:]) if err != nil { fmt.Println("read error:",