FIND YOUR NEXT FEW LINES

Results for “Go”

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

182 snippets foundClear filters
GoFunctions & types

Embed a struct for shared fields

Embed a struct for shared fields using a complete Go program with explicit sample inputs.

Go✓ Tested
GoJSON & encoding

Encode a struct with JSON field names

Encode a struct with JSON field names using a complete Go program with explicit sample inputs.

Go✓ Tested
GoJSON & encoding

Encode and decode Base64 text

Encode and decode Base64 text using a complete Go program with explicit sample inputs.

Go✓ Tested
GoJSON & encoding

Encode bytes as hexadecimal

Encode bytes as hexadecimal using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

Encode URL query parameters

Encode URL query parameters using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

Extract a route path variable

Extract a route path variable using a complete Go program with explicit sample inputs.

Go✓ Tested
GoStrings & text

Extract digit sequences

Extract digit sequences using a complete Go program with explicit sample inputs.

Go✓ Tested
GoSlices & collections

Filter values into a new slice

Filter values into a new slice using a complete Go program with explicit sample inputs.

Go✓ Tested
GoSlices & collections

Find an item’s index

Find an item’s index using a complete Go program with explicit sample inputs.

Go✓ Tested
C++Sequence algorithms

Find the first value satisfying a condition

C++: Compare the returned iterator with end before dereferencing it.

C++✓ Tested
GoDates & times

Find the weekday for a date

Find the weekday for a date using a complete Go program with explicit sample inputs.

Go✓ Tested
GoGetting Started

Format a readable status message

Format a readable status message using a complete Go program with explicit sample inputs.

Go✓ Tested