Mastering Go Application Design: HTTP Servers (Part 1)
Part 1 , Part 2 Go is an excellent choice for writing your next http service. It supports multithreaded request handling with the standard library and many other convenient features that makes creating a new application a breeze. Here is an example of a http service that returns the current time as json. Playground: https://go.dev/play/p/gZGKLEhHkPR package main import ( "encoding/json" "log" "net/http" "time" ) // Response is a simple json response // that will be returned by the http server // the json tags are used to specify the // json keys type Response struct { Status string `json:"status"` // json key is "status" Time string `json:"time"` // json key is "time" } // this is a simple http server that returns a json response func main() { // create a new http serve mux // the serve mux is used to register http handlers // for different paths mux := http....