FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
125 snippets foundClear filters
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