Cookies management by TermsFeed Cookie Consent

Go Tutorials & Examples

Learn Go programming by example. GOSAMPLES is a library of Go tutorials and examples that helps you solve everyday code problems.

Help us grow this site πŸš€. Disable your ad blocker to see non-intrusive ads

πŸ‘ˆ Decode Base64 to a string in Go

Learn how to decode Base64 data to a string using encoding/base64 package
base64 encoding strings

πŸ‘‰ Encode a string to Base64 in Go

Learn how to encode strings to Base64 using encoding/base64 package
base64 encoding strings

πŸ–¨οΈ Convert string to []byte or []byte to string in Go

Learn the difference between a string and a byte slice
introduction strings slice

🧠 Print the memory address of a variable in Go

Learn how to find and print the address of a variable or pointer
introduction pointer slice

🏟️ Capacity and length of a slice in Go

Learn what is the difference between length and capacity of a slice
introduction slice array

πŸ•΅οΈ Solve 'cannot take address of XXX' error in Go

Learn how to take the address of a literal, map value, or function return value
introduction pointer errors

πŸ”Ÿ Convert string to bool in Go

Learn how to parse a string as a bool
introduction strings bool

πŸ‘― Remove duplicate spaces from a string in Go

Learn how to remove all redundant whitespaces from a string
introduction strings regex

πŸͺ  Handle 'broken pipe' error in Go

Learn how to detect the β€˜broken pipe’ error when writing an HTTP response
http errors

πŸ“š Convert byte slice to io.Reader in Go

Learn how to satisfy io.Reader interface using byte slice
introduction slice
1 ... 8 ... 12