Linked by Thom Holwerda on Wed 28th Mar 2012 19:22 UTC
General Development "Today marks a major milestone in the development of the Go programming language. We're announcing Go version 1, or Go 1 for short, which defines a language and a set of core libraries to provide a stable foundation for creating reliable products, projects, and publications. Go 1 is the first release of Go that is available in supported binary distributions. They are available for Linux, FreeBSD, Mac OS X and, we are thrilled to announce, Windows."
Permalink for comment 512375
To read all comments associated with this story, please click here.
RE[3]: Too bad it is so slow
by voidlogic on Thu 29th Mar 2012 22:22 UTC in reply to "RE[2]: Too bad it is so slow"
voidlogic
Member since:
2005-09-03

So I'm looking at your programs, are they both being called when someone navigates to the URL? Or are you just statically servering the .c file (which would make no sense)?

If some kind of CGI is running your C program, then it is doing less work:

puts("Hello World!\n");
VS.
fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])

Your Go program should be:
fmt.Print("Hello World!\n")

Also, I assume whatever CGI is running your C program is not using chunking, so you should set your Go response to also not use chunking... I also assume the C CGI is not putting the date/time in the response header, go is by default to you should tell it not to.

Reply Parent Score: 2