Hello Lutz This code already looks nice, and running "go vet" doesn't even complain, great!
I'll go with 2 remarks and leave other concerns to other reviewers : - using ioutil.ReadFile to serve some static html isn't the most idiomatic. Have a look at html/template <https://golang.org/pkg/html/template/>. - why write func(handler *Handler) { handler.Index(w, req) }(handler) instead of handler.Index(w, req) ? Is there an expected benefit that I'm not seeing? I wish you a pleasant journey in go world. Cheers Val On Tuesday, May 2, 2017 at 9:32:45 AM UTC+2, Lutz Horn wrote: > > Hi Go Nuts, > > to practice my Go skills, I've implemented a simple web application that > allows you to shorten an URL. The application consists of a backend > written in Go and a web frontend using jQuery with some plugins and > Bootstrap for layout. > > The code is available on GitHub at https://github.com/lutzhorn/shorturl, > the application is deployed on https://u.lhorn.de. > > I would very much appreciate any feedback you can give especially on the > Go part. Coming from a Java and Python background, I'm trying to get > into the Go way of programming, In Python there is a 'Pythonic' way to > write code, I am sure there is something similar in Go: File structure, > name choice, exporting names, error handling, ... > > If you have a little time, please tak a look at the code, play with the > deployed application, and please give me feedback. > > Thanks! > > Lutz > > > -- 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 https://groups.google.com/d/optout.