hi and welcome! At first, it looks like you did not use a *go aware IDE*. Despite its apparent simplicity, the go language uses a lot of tooling to achieve the goal of ~~quality~~. https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins https://github.com/golang/go/wiki/CodeTools
You might want to use those tools in future https://goreportcard.com/report/github.com/douglasmakey/ursho https://godoc.org/github.com/douglasmakey/ursho https://godoc.org/golang.org/x/tools/cmd/godoc Note that you can add their badges to your readme, its good for readers, it adds a bit of color and give him some overall before he digs the code. https://raw.githubusercontent.com/DATA-DOG/go-sqlmock/master/README.md About database, it worth to mention this package https://github.com/go-gorp/gorp In my opinion, a sqlite database, as default, is more suitable for sharing. You might take advantage of cli flags to enhance a bit the options of the bin, https://golang.org/pkg/flag/ As you do use a dependency manager, might be glide or dep https://github.com/golang/dep/ i suggest to always add a ci to your repo and enable it, the point is to ensure that the dependencies are complete and working. Its easy to import a dependency from GOPATH and forget to manage it in the dependencies tree. I had a very similar issue yesterday (https://travis-ci.org/mh-cbon/go-msi/builds / https://github.com/mh-cbon/go-msi/commit/01538f725f0685ccc711b9f64b5ce2e2426cd321), the CI helped me to find out about it. small mistake in https://github.com/douglasmakey/ursho/tree/master/enconding unless i missed something. This is hard https://github.com/douglasmakey/ursho/blob/master/handlers/base.go#L21 Panic during init sequence is bad practice. In that case instead of using functions, you could have created a sort of http service with an init method like you did for the database at https://github.com/douglasmakey/ursho/blob/master/storages/postgres.go#L18 This looks superfluous, imho, https://github.com/douglasmakey/ursho/blob/master/main.go#L47 All this code and complexity to close the http server, in that case, does not add value. Also, its reading is surprising (twice listenAndServe ? duplication of close<-true) If you was looking for a topic to play with chan/data races, i suggest to make the data layer a service, and create an in memory store, you can do it using chan or mutex. You have not included any test, hope this helps, https://elithrar.github.io/article/testing-http-handlers-go/ https://github.com/DATA-DOG/go-sqlmock On Wednesday, August 23, 2017 at 11:31:15 PM UTC+2, dou...@cornershopapp.com wrote: > > i have created a simple url shortener service, for practice and learn with > go, what do you think ! > > https://github.com/douglasmakey/ursho > -- 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.