Results for “File positioning & lifecycle”
Small, practical examples. Search by task or narrow things down below.
Create nested folders
Create a folder and any missing parent folders in one call. Running the code again is safe when the folder already exists.
directory✓ Tested
Declare a fixed-size array
Declare a fixed-size array using a complete Go program with explicit sample inputs.
Go✓ Tested
Declare a named volume in Compose
Mount persistent storage at a service path.
Compose✓ Tested
Declare a typed constant
Declare a typed constant in a complete Rust program using the standard library.
Rust✓ Tested
Declare and update a variable
Declare and update a variable using a complete Go program with explicit sample inputs.
Go✓ Tested
Decode bytes as validated UTF-8
Decode bytes as validated UTF-8 in a complete Rust program using the standard library.
Rust✓ Tested
Decode JSON into a typed struct
Decode JSON into a typed struct using a complete Go program with explicit sample inputs.
Go✓ Tested
Deduplicate sorted values
Deduplicate sorted values using a complete Go program with explicit sample inputs.
Go✓ Tested
Define a first Compose service
Docker / Compose: Define a first Compose service in a small Compose file.
Docker / Compose✓ Tested
Define a function with a parameter
PowerShell: Define a function with a parameter using PowerShell 7.
PowerShell✓ Tested
Define a function with a typed parameter
Accept a name and return a greeting.
function✓ Tested
Define a one-off Compose service
Describe an image and command in a reusable YAML file.
Compose✓ Tested