4 bookmarks for 2024-02-04

1105.

On Rigorous Error Handling

250bpm.com/blog:140
1104.

Better HTTP server routing in Go 1.22 - Eli Bendersky's website

eli.thegreenplace.net/2023/better-http-server-routing-in-go-122

The fish told me of this cool new feature. In short,

func main() {
  mux := http.NewServeMux()
  mux.HandleFunc("GET /path/", func(w http.ResponseWriter, r *http.Request) {
    fmt.Fprint(w, "got path\n")
  })

  mux.HandleFunc("/task/{id}/", func(w http.ResponseWriter, r *http.Request) {
    id := r.PathValue("id")
    fmt.Fprintf(w, "handling task with id=%v\n", id)
  })

  http.ListenAndServe("localhost:8090", mux)
}

Handy!

1103.

Такой же

grishaev.me/the-same

Гришаев решил корабль Тезея.

1102.

How Doom didn't kill the Amiga

www.datagubbe.se/afb