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.
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.
I took a look at the code. Here are my initial impressions.
Config
Too much config data is passed to NewURLDB. From its name, I expected it would only access Config.Db, but it also accesses Config.Hashids and could (but does not seem to) access Config.Views and Config.HTTP.