Hi,
I'm giving a talk at work introducing Go and I'm looking for small examples
to show Go's potential. For example, the following program demonstrates a
bare-bones webserver in 13 lines:
import (
"fmt"
"net/http"
)
func home(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, world!")
}
func main() {
http.HandleFunc("/", home)
http.ListenAndServe(":8080", nil)
}
Has anyone here got any more little snippets like this to show the power
and potential of Go? It doesn't have to be in networking, just little a
little snippet to make people think "wow, that's cool!".
Thanks.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.