Re: [go-nuts] Re: Learning Data Structures and algorithms with Golang

2019-04-13 Thread Hemant Singh
I agree with Ian. My 2 cents. This is a Golang-nuts mailer. Any book on the language may be useful to users to read. - Hemant On Fri, Apr 12, 2019 at 6:59 PM Ian Lance Taylor wrote: > On Fri, Apr 12, 2019 at 3:55 PM wrote: > > > > Bhagvan's disgrceful misuse of this forum to support his

[go-nuts] Re: ctrl-c and Golang

2019-02-18 Thread Hemant Singh
.00 bps You pressed ctrl + C. User interrupted > infinite loop.[1 1 1 1 1 1 > 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...0] > > > so, I think that others wrong in your code. > > > > 在 2019年2月16日星期六 UTC+8下午10:29:45,Hemant Singh写道: >> >&

Re: [go-nuts] ctrl-c and Golang

2019-02-16 Thread Hemant Singh
> I'm sure you mostly meant it for illustrative purposes. > > > - Dave > > > > On Feb 16, 2019, at 9:29 AM, Hemant Singh > wrote: > > > > I have the following program. The program is processing network packets > at 1 Gbps rate. I don't want to pr

[go-nuts] ctrl-c and Golang

2019-02-16 Thread Hemant Singh
I have the following program. The program is processing network packets at 1 Gbps rate. I don't want to print the rate for every packet. Instead, I'd like to save the rate in an array and dump the array on Ctrl-c of the program. When I dump the array on Ctrl-c, the data is all zeroes.

Re: [go-nuts] inverse of time.Duration?

2019-02-15 Thread Hemant Singh
Thanks all. I figured it out too, but using sprintf and strconv.Atoi. Best. Hemant On Friday, February 15, 2019 at 3:19:38 PM UTC-5, Burak Serdar wrote: > > On Fri, Feb 15, 2019 at 1:15 PM Sam Whited > wrote: > > > > On Fri, Feb 15, 2019, at 20:00, Burak Serdar wrote: > > >

[go-nuts] Re: packet filter for VM in golang

2018-10-04 Thread Hemant Singh
gt; 2018. október 4., csütörtök 14:22:49 UTC+2 időpontban Hemant Singh a > következőt írta: > >> Right. However, if a VM is using SR-IOV which connects the VM directly >> to the NIC, the kernel is bypassed. Since sending my email, I also found a >> packet filter in go

[go-nuts] Re: packet filter for VM in golang

2018-10-04 Thread Hemant Singh
Right. However, if a VM is using SR-IOV which connects the VM directly to the NIC, the kernel is bypassed. Since sending my email, I also found a packet filter in golang: https://godoc.org/golang.org/x/net/bpf I have tested the above code yet. Thanks, Hemant On Thursday, October 4, 2018

[go-nuts] packet filter for VM in golang

2018-10-03 Thread Hemant Singh
I know about EBPF which is a packet filter in the Linux kernel. However, I think, a virtual machine (VM) using SR-IOV to a NIC bypasses the kernel. Has any packet filter been developed in golang akin to EBPF? Does any Go library have any packet filter or metering functionality? My eventual

Re: [go-nuts] using 'go function_call()' inside Go program

2018-09-30 Thread Hemant Singh
Hi Justin, Got it - thanks much! Hemant On Saturday, September 29, 2018 at 11:58:30 PM UTC-4, Justin Israel wrote: > > > > On Sun, Sep 30, 2018 at 3:47 PM Hemant Singh > wrote: > >> I have a question. I have changed the open goping.go code to return

[go-nuts] using 'go function_call()' inside Go program

2018-09-29 Thread Hemant Singh
I have a question. I have changed the open goping.go code to return error from functions. The following function is implemented in a .goping.go file. func ping(config *Config, address, name string, pattern *regexp.Regexp) error { } Another function shown below, in the same .go file, calls

Re: [go-nuts] run cmd and capture output on remote machine

2018-09-26 Thread Hemant Singh
25, 2018 at 11:29:08 PM UTC-4, Robert Engels wrote: > > You can do this via ssh. > > On Sep 25, 2018, at 7:01 PM, Hemant Singh > wrote: > > I have been able to run a command on a remote machine using Go. Is there > a working example that shows how to capture the ou

[go-nuts] run cmd and capture output on remote machine

2018-09-25 Thread Hemant Singh
I have been able to run a command on a remote machine using Go. Is there a working example that shows how to capture the output of the command back to the client machine? Maybe an interactive shell... My other choice is to run the command and save its output to a file and copy the file