Results for “Go”
Small, practical examples. Search by task or narrow things down below.
Update a value through a pointer
Update a value through a pointer using a complete Go program with explicit sample inputs.
Go✓ Tested
Use a condition-only for loop
Use a condition-only for loop using a complete Go program with explicit sample inputs.
Go✓ Tested
Validate UTF-8 bytes
Validate UTF-8 bytes using a complete Go program with explicit sample inputs.
Go✓ Tested
Wait for concurrent workers
Wait for concurrent workers using a complete Go program with explicit sample inputs.
Go✓ Tested
Wrap an error with context
Wrap an error with context using a complete Go program with explicit sample inputs.
Go✓ Tested
Write a generic slice helper
Write a generic slice helper using a complete Go program with explicit sample inputs.
Go✓ Tested
Write and read a UTF-8 file
Write and read a UTF-8 file using a complete Go program with explicit sample inputs.
Go✓ Tested
Calculate a total for each group
SQL: Group nonmissing categories and calculate separate totals.
SQL✓ Tested
Calculate a total for each group
SQL Server: Group nonmissing categories and calculate separate totals.
SQL Server✓ Tested
Calculate a total for each group
Postgres: Group nonmissing categories and calculate separate totals.
Postgres✓ Tested
Calculate a total for each group
SQLite: Group nonmissing categories and calculate separate totals.
SQLite✓ Tested
Clamp a value to a range
Use C++17 clamp to bound a numeric value.
C++✓ Tested