/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

luketic.de
| | www.integralist.co.uk

Introduction Four ways to skin a cat How does the adapter work? Why is this interesting? Summary/Breakdown Introduction Here is some code that demonstrates the typical 'hello world' for a Go based web server: package main import ( "fmt" "net/http" ) func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello %s", r.URL.Path[1:]) } func main() { http.HandleFunc("/World", handler) http.ListenAndServe(":8080", nil) } Note: http://localhost:8080/World will return Hello World For most people,...
2.6 parsecs

Travel
| |
| | danielmangum.com

This guide will teach you how to run the Kong API gateway locally as a proxy server for a Golang API using Docker. The Go API Link to heading The Golang standard library has a very simple http library that makes it very easy to spin up a web server. For now, we will build the simplest implementation of a web server. Start by creating a new directory in your go/src/.
2.4 parsecs

Travel
| |
| | hjr265.me

I have been meaning to do a few short-form blog posts lately. This blog post is going to be one of them. In Go, on Linux, if you want to know when the terminal window is resized, you can listen for the SIGWINCH signal using the signal.Notify (or the signal.NotifyContext) function. The code will look something like this: 1 2 3 4 5 ch := make(chan os.Signal) signal.Notify(ch, syscall.SIGWINCH) for range ch { // The terminal has been resized.
4.1 parsecs

Travel
| |
| | benhoyt.com

My re-implementation of the code from the official Go tutorial 'Developing a RESTful API with Go and Gin', using only the standard library, adding tests, and fixing issues.
17.9 parsecs

Travel
|