[go-nuts] Re: Go predicts the end of the universe

2017-11-11 Thread Gabriel Aszalos
Seems time is on our side. On Friday, 10 November 2017 09:38:37 UTC+1, Hal wrote: > > Go predicts the end of the time, i.e. the end of the universe 😂 > > https://play.golang.org/p/THHvbdo_IS > > package main > > > import ( > "fmt" > "math" > "time" > ) > > > func main() { > endOfTheTime := tim

Re: [go-nuts] Re: Go predicts the end of the universe

2017-11-11 Thread andrey mirtchovski
> > Seems time is on our side. > yes it is. -- 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 htt

[go-nuts] Re: network programming about go

2017-11-11 Thread 2891132love
this is the server program: > package main > > import ( > "fmt" > "net" > "os" > "strings" > ) > > func main() { > > listener, err := net.Listen("tcp", "0.0.0.0:400") > checkError(err) > for i := 0; i < 10; i++ { > conn, err := listener.Accept() > if err != nil { > continue > } > handleClient(co

Re: [go-nuts] Re: Go predicts the end of the universe

2017-11-11 Thread Michael Banzon
Remember to flush your buffers! -- Michael Banzon https://michaelbanzon.com/ > Den 11. nov. 2017 kl. 09.32 skrev andrey mirtchovski : > > Seems time is on our side. yes it is. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe fro

[go-nuts] Re: gRPC golang server and client testing

2017-11-11 Thread Simon Ritchie
Not everybody in the Go community favours the use of mocking tools, so many published solutions don't have any tests of that kind. Maybe you should write the tests yourself. I use pegomock for mocking. (I tried gomock but I found issues that were not fixed. I also found a couple of issues w

Re: [go-nuts] How to Upload a file using angular4 for browsing and api created in golang?

2017-11-11 Thread Marcus Franke
> > I am working on an application in which I need to upload a file using > Golang and Angular 4.Suppose I have an input type file and an upload button > on the screen. When I browse a file from my system and clicks upload > button.Now following are my queries regarding file upload: > > 1. How will

[go-nuts] Can/should the SSA optimizer cross package boundaries?

2017-11-11 Thread Petar Maymounkov
Consider a chain of functions that call each other: func f1(x X) { ... f2(y) ... } func f2(y Y) { ... f3(z) ... } and so on. Assume also that their arguments and return values are static Go types (no interfaces). Generally, such a chain of statically-typed invocations will fall withi

[go-nuts] Re: Can/should the SSA optimizer cross package boundaries?

2017-11-11 Thread Dave Cheney
Hi, Thanks for following up here. On Sunday, 12 November 2017 03:35:27 UTC+11, Petar Maymounkov wrote: > > Consider a chain of functions that call each other: > > > func f1(x X) { ... f2(y) ... } > func f2(y Y) { ... f3(z) ... } > and so on. > > > Assume also that their arguments and retu

Re: [go-nuts] Re: network programming about go

2017-11-11 Thread Justin Israel
On Sat, Nov 11, 2017, 9:55 PM <2891132l...@gmail.com> wrote: > this is the server program: > >> package main >> >> import ( >> "fmt" >> "net" >> "os" >> > "strings" >> ) >> >> func main() { >> >> listener, err := net.Listen("tcp", "0.0.0.0:400") >> > checkError(err) >> for i := 0; i < 10; i++ { >

Re: [go-nuts] Re: network programming about go

2017-11-11 Thread Justin Israel
On Sun, Nov 12, 2017, 10:03 AM Justin Israel wrote: > > > On Sat, Nov 11, 2017, 9:55 PM <2891132l...@gmail.com> wrote: > >> this is the server program: >> >>> package main >>> >>> import ( >>> "fmt" >>> "net" >>> "os" >>> >> "strings" >>> ) >>> >>> func main() { >>> >>> listener, err := net.List

[go-nuts] Re: warning: "std" matched no packages (hello world works)

2017-11-11 Thread peterGo
If you had removed all remnants of gccgo and followed these installation instructions Getting Started https://golang.org/doc/install I would have expected to see something like this: $ go version go version go1.9.2 linux/amd64 $ go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTO

[go-nuts] Re: Zip file created by archive/zip can't be opened on Windows machine

2017-11-11 Thread thebrokentoaster
If you can provide a minimal reproduction in Go code, then I can take a look at it. I fixed a number of zip issues for the upcoming Go1.10 release. JT On Friday, November 10, 2017 at 4:25:45 PM UTC-8, Donovan wrote: > > its not totally clear the exact issue you're dealing with - a minimal > exa

Re: [go-nuts] Efficient to copy Hash?

2017-11-11 Thread thebrokentoaster
Go 1.10 adds MarshalBinary and UnmarshalBinary to each of the hash.Hash implementations. You can use those to effectively copy the hash structure. However, I doubt you would get a performance benefit for a string only 64 bytes long. JT On Wednesday, November 8, 2017 at 9:47:33 AM UTC-8, Christ