FIND YOUR NEXT FEW LINES

Results for “Go”

Small, practical examples. Search by task or narrow things down below.

182 snippets foundClear filters
GoGetting Started

Count Unicode code points

Count Unicode code points using a complete Go program with explicit sample inputs.

Go✓ Tested
GoFiles & paths

Create and clean up a temporary file

Create and clean up a temporary file using a complete Go program with explicit sample inputs.

Go✓ Tested
GoFiles & paths

Create nested directories

Create nested directories using a complete Go program with explicit sample inputs.

Go✓ Tested
GoGetting Started

Declare a fixed-size array

Declare a fixed-size array using a complete Go program with explicit sample inputs.

Go✓ Tested
GoGetting Started

Declare and update a variable

Declare and update a variable using a complete Go program with explicit sample inputs.

Go✓ Tested
GoJSON & encoding

Decode JSON into a typed struct

Decode JSON into a typed struct using a complete Go program with explicit sample inputs.

Go✓ Tested
GoSlices & collections

Deduplicate sorted values

Deduplicate sorted values using a complete Go program with explicit sample inputs.

Go✓ Tested
GoFunctions & types

Define related integer constants

Define related integer constants using a complete Go program with explicit sample inputs.

Go✓ Tested
GoMaps & sets

Delete a map entry

Delete a map entry using a complete Go program with explicit sample inputs.

Go✓ Tested
GoDates & times

Display an instant at a fixed offset

Display an instant at a fixed offset using a complete Go program with explicit sample inputs.

Go✓ Tested
GoTesting & reusable helpers

Distinguish end-of-input from other errors

Distinguish end-of-input from other errors using a complete Go program with explicit sample inputs.

Go✓ Tested
GoMaps & sets

Distinguish missing keys from zero values

Distinguish missing keys from zero values using a complete Go program with explicit sample inputs.

Go✓ Tested