Adding Headers to HTTP Requests in Go

Build requests with http.NewRequest() to add headers, then send them with http.Client{}

 · Updated  · 2 min · 268 words

Using time.Sleep() in Go

Examples of using time.Sleep() in Go because the official documentation is lacking.

 · Updated  · 2 min · 321 words

Validate HTTP Status Codes in Go Using Built-in Constants

Use Go net/http constants like StatusOK and StatusNotFound for more readable code.

 · Updated  · 2 min · 378 words

Iterate Through Strings in Go with a for-range Loop

You can use for-range loops to iterate through strings in Go without splitting because Go handles strings as byte slices.

 · Updated  · 2 min · 219 words

Insertion Order Iteration of Maps in Go

Iterating through Go maps in insertion order.