Golang Code Examples

Learn Golang programming by example. GOSAMPLES is a library of Golang code snippets that let you solve everyday code problems.

🔗 URL Encode in Go

Learn how to URL encode a path and query parameters in Go
introduction encoding url

😴 Sleep function in Go

Learn how to pause the execution of a current Goroutine
introduction goroutine time

🤔 Print type of variable in Golang

Learn how to check variable's type in Go
introduction type

➰ Foreach loop in Go

Learn how to construct the popular programming loop
introduction loop

〰️ Encode to and decode from Base64 strings in Golang

Learn how to encode and decode strings using Base64
base64 encoding decoding strings