Adding Headers to HTTP Requests in Go

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

 · Updated  · 2 min · 267 words

Using time.Sleep() in Go

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

 · Updated  · 2 min · 307 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 · 369 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  · 1 min · 209 words

Insertion Order Iteration of Maps in Go

Iterating through Go maps in insertion order.