Golang Code Examples

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

πŸ—ƒοΈ 3 ways to pretty print JSON in Go

Learn how to generate JSON with indentation
introduction json strings

πŸ—ΊοΈ Convert map to JSON in Go

Learn how to convert map to JSON string
introduction json strings

πŸ”’ Convert int to string in Go

Learn how to convert int, int64, int32, int16 or int8 to a decimal, hexadecimal octal or binary string
introduction numbers integer

βœ’οΈ Write to a CSV file in Go

Learn how to write data to a CSV or TSV file
introduction file

πŸ™Œ Case-insensitive string comparison in Go

Learn how to compare strings in a case-insensitive manner
introduction strings