The goal of this repository is to teach you the "way to Go" with concrete examples and good practices. It could be a starting point for a company who wants to explore the possibilities of the Go language, or a support for a quick presentation of the language, or save there apps templates.
Using it needs:
- being introduced first to the tour of Go
- having some sense of the
pkg
repository - the target environment is Ubuntu, Linux
It is composed of:
- 0.
ini
, the documentation- 0.install instructions
- 1.IDE setup
- 1.
cmd
, the command line apps who quit when the work is done- 0.empty
- the empty app is interesting to measure the Go language overhead
- 1.hello
- a classic, but will teach the command line options and writing styles
- 2.environment
- setup an environment to configure your app, overwrite it with the command line
- 0.empty
- 2.
srv
, the services apps who stay alive and never quit- 0.hello
- 0.default
- the simplest "hello world" service
- 1.mux
- same "hello world" but using the famous
gorilla/mux
package
- same "hello world" but using the famous
- 0.default
- 1.simple
- a simple web server with HTML templates and static directories
- 2.system, a web server started and controlled by
systemd
- 0.notify
- a simple server that answers to readiness and liveness
- 1.socket
- a more robust server that lets
systemd
deal with sockets
- a more robust server that lets
- 0.notify
- 3.crud, a simple "create retrieve update delete" app
- 0.file, on a file system
- 1.sql, on SQL using Gorm
- 4.api, a simple CRUD api with a server and a client
- 0.server
- 1.client
- 0.hello
Numbers are used in the directory names for ordering them.