In-reply-to » @prologic and others may I ask you to review some code? https://git.envs.net/cblte/golang-webapp/releases/tag/0.7 It is not finished yet, but I think I am on a good way. Still needs some polishing. WebDev is actually new to me with all the status codes and stateless things and everything. So feedback would be appreciated. Using Redis because it was easy to setup and to implement. Actually want to use SQLite or something else, but Redis seems to do the job for now.

Hello @carsten@yarn.zn80.net,
I’ll say that :

  • everything being in the main is bad
  • the handler structure can be better, more structured and separating the http part, from the real business part (some interfaces may help)
  • rclient should be injected.
  • there is no env variable management / config management (viper is good for that)
  • there is no unit tests (that one you know)
  • there is no metrics (if it was a professional project I ’ll be waiting for those)
  • gitignore should maybe have golang-webapp on it.

⤋ Read More